ci.yml
Language YAML2.4 KB86 lines
name: cion:push:pull_request:env:CARGO_TERM_COLOR: alwaysjobs:checks:runs-on: ubuntu-24.04steps:- uses: actions/checkout@v4- run: scripts/check-no-em-dash.sh- run: scripts/check-secrets.shrust:runs-on: ubuntu-24.04steps:- uses: actions/checkout@v4- name: Linux libraries for the webviewrun: |sudo apt-get updatesudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev- uses: dtolnay/rust-toolchain@stablewith:components: rustfmt, clippy- uses: Swatinem/rust-cache@v2- uses: actions/setup-node@v4with:node-version: 22cache: npm# tauri's build script needs the built frontend to embed.- run: npm ci && npx vite build- run: cargo fmt --all --check- run: cargo clippy --workspace --all-targets -- -D warnings- run: cargo test --workspace- name: The TypeScript types match the Rust onesrun: git diff --exit-code -- src/ipc/genfrontend:runs-on: ubuntu-24.04steps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: 22cache: npm- run: npm ci- run: npm run format:check- run: npx tsc --noEmit- run: npx vitest run- run: npx playwright install --with-deps chromium- run: npx playwright testenv:CI: '1'- uses: actions/upload-artifact@v4if: failure()with:name: playwright-tracespath: test-results/e2e:needs: [rust, frontend]runs-on: ubuntu-24.04steps:- uses: actions/checkout@v4- run: |sudo apt-get updatesudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev webkit2gtk-driver xvfb dbus-x11- uses: dtolnay/rust-toolchain@stable- uses: Swatinem/rust-cache@v2- uses: actions/setup-node@v4with:node-version: 22cache: npm- run: cargo install tauri-driver --locked- run: npm ci- run: npx tauri build --debug --no-bundle --features e2e- run: E2E_SHOT=e2e-failure.png scripts/e2e-linux.sh- uses: actions/upload-artifact@v4if: failure()with:name: e2e-screenshotpath: e2e-failure.png