51 lines
1.2 KiB
YAML
51 lines
1.2 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
|
|
cd sync-server
|
|
sqlx database create --database-url sqlite://db.sqlite3
|
|
sqlx migrate run --source src/app_state/database/migrations --database-url sqlite://db.sqlite3
|
|
|
|
- name: E2E tests
|
|
run: |
|
|
cd sync-server
|
|
cargo run config-e2e.yml --color never &
|
|
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
|