name: CI on: pull_request: push: branches: [main] permissions: contents: read concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: flake: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-nix - name: Run flake checks run: nix flake check --print-build-logs rust: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-nix - name: Check formatting run: nix develop --command cargo fmt --all --check - name: Run clippy run: nix develop --command cargo clippy --locked --workspace --all-targets -- -D warnings - name: Run workspace tests run: nix develop --command cargo test --locked --workspace web: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-nix - name: Verify wasm target run: nix develop --command rustc --print target-libdir --target wasm32-unknown-unknown > /dev/null - name: Build web bundle run: nix develop --command trunk build --locked --release --public-url /app/ --dist dist/app --html-output index.html web-app.html - name: Validate website assembly run: nix develop --command python3 scripts/test_site.py release-automation: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-nix - name: Test release automation run: nix develop --command python3 scripts/test_release.py