Update actions
This commit is contained in:
parent
4851e85986
commit
0b53cbba19
2 changed files with 4 additions and 82 deletions
30
.github/workflows/check.yml
vendored
30
.github/workflows/check.yml
vendored
|
|
@ -12,7 +12,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -26,42 +26,20 @@ jobs:
|
|||
- name: Setup rust
|
||||
run: |
|
||||
cargo install sqlx-cli wasm-pack cargo-machete
|
||||
cd backend
|
||||
sqlx database create --database-url sqlite://db.sqlite3
|
||||
sqlx migrate run --source sync_server/src/app_state/database/migrations --database-url sqlite://db.sqlite3
|
||||
|
||||
- name: Build wasm
|
||||
run: |
|
||||
cd backend
|
||||
wasm-pack build --target web sync_lib
|
||||
wasm-pack build --target web
|
||||
|
||||
- name: Lint backend
|
||||
- name: Lint
|
||||
run: |
|
||||
cd backend
|
||||
cargo clippy --all-targets --all-features
|
||||
cargo fmt --all -- --check
|
||||
cargo machete
|
||||
|
||||
- name: Test backend
|
||||
- name: Test
|
||||
run: |
|
||||
cd backend
|
||||
cargo test --verbose -- --include-ignored
|
||||
cd sync_lib
|
||||
wasm-pack test --node
|
||||
|
||||
- name: Lint frontend
|
||||
run: |
|
||||
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 linting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test frontend
|
||||
run: |
|
||||
cd frontend
|
||||
npm run test
|
||||
|
|
|
|||
56
.github/workflows/e2e.yml
vendored
56
.github/workflows/e2e.yml
vendored
|
|
@ -1,56 +0,0 @@
|
|||
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/app_state/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
|
||||
cargo run -p sync_server 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue