56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: E2E tests
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: "-Dwarnings"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v4.2.0
|
|
with:
|
|
node-version: "22.x"
|
|
check-latest: true
|
|
|
|
- name: Setup rust
|
|
run: |
|
|
cargo install sqlx-cli wasm-pack
|
|
cd backend
|
|
sqlx database create --database-url sqlite://db.sqlite3
|
|
sqlx migrate run --source sync_server/src/database/migrations --database-url sqlite://db.sqlite3
|
|
|
|
- name: Build wasm
|
|
run: |
|
|
cd backend
|
|
wasm-pack build --target web sync_lib
|
|
|
|
- name: E2E tests
|
|
run: |
|
|
cd backend
|
|
RUST_BACKTRACE=1 cargo run -p sync_server config-e2e.yml &
|
|
cd ..
|
|
|
|
scripts/update-api-types.sh
|
|
cd frontend
|
|
npm ci
|
|
npm run build
|
|
npm run lint
|
|
if [[ $(git status --porcelain) ]]; then
|
|
git status --porcelain
|
|
echo "Failing CI because the working directory is not clean after updating the API types"
|
|
exit 1
|
|
fi
|
|
|
|
cd ..
|
|
scripts/e2e.sh 32
|