remove unused rustsec ignore #1398
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Checks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| frontend: | |
| name: Check and build frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: frontend | |
| - name: Lint | |
| run: npm run lint | |
| working-directory: frontend | |
| - name: Test | |
| run: npm run test | |
| working-directory: frontend | |
| - name: Build | |
| run: npm run build | |
| working-directory: frontend | |
| - name: Upload frontend asset folder | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: frontend | |
| path: frontend/dist | |
| prepare-playwright: | |
| name: Prepare playwright Tests | |
| runs-on: ubuntu-latest | |
| needs: frontend | |
| env: | |
| SQLX_OFFLINE: true | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Download frontend asset folder | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: frontend | |
| path: frontend/dist | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| shared-key: "playwright" | |
| - name: Build backend | |
| run: cargo build --features apply-db-migrations --bin app | |
| - name: Upload backend binary | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: 'app' | |
| path: target/debug/app | |
| playwright: | |
| name: Run Playwright Tests (${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| needs: prepare-playwright | |
| strategy: | |
| matrix: | |
| shardIndex: [ 1, 2, 3 ] | |
| shardTotal: [ 3 ] | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: remails | |
| POSTGRES_PASSWORD: remails | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Download backend binary | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: app | |
| path: target/debug | |
| - name: Download frontend asset folder | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: frontend | |
| path: frontend/dist | |
| - name: mark backend as executable | |
| run: chmod +x target/debug/app | |
| - name: run backend | |
| run: NO_COLOR=true ./target/debug/app > logs-${{ matrix.shardIndex }}_of_${{ matrix.shardTotal }} & | |
| - name: Apply some DB fixtures | |
| run: | | |
| psql -h localhost -U remails -w remails < src/fixtures/organizations.sql && \ | |
| psql -h localhost -U remails -w remails < src/fixtures/api_users.sql && \ | |
| psql -h localhost -U remails -w remails < src/fixtures/projects.sql && \ | |
| psql -h localhost -U remails -w remails < src/fixtures/runtime_config.sql | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: frontend | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| working-directory: frontend | |
| - name: Run Playwright tests | |
| run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
| working-directory: frontend | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v6 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report-(${{ matrix.shardIndex }}_of_${{ matrix.shardTotal }}) | |
| path: frontend/playwright-report/ | |
| - name: Upload backend logs | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: backend logs (${{ matrix.shardIndex }} of ${{ matrix.shardTotal }}) | |
| path: logs-${{ matrix.shardIndex }}_of_${{ matrix.shardTotal }} | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: frontend | |
| env: | |
| SQLX_OFFLINE: true | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: remails | |
| POSTGRES_PASSWORD: remails | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install toolchain | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: stable | |
| - name: Install cargo-llvm-cov & cargo-nextest | |
| uses: taiki-e/install-action@28a9d316db64b78a951f3f8587a5d08cc97ad8eb # v2.65.6 | |
| with: | |
| tool: cargo-llvm-cov,cargo-nextest | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| shared-key: "checks" | |
| - name: Register rust problem matcher | |
| run: echo "::add-matcher::.github/problem-matchers/rust.json" | |
| - name: Download frontend asset folder | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: frontend | |
| path: frontend/dist | |
| - name: cargo llvm-cov nextest | |
| run: cargo llvm-cov nextest --lcov --output-path lcov.info | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| files: lcov.info | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| format: | |
| name: Cargo fmt | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| SQLX_OFFLINE: true | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| - name: Install toolchain | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: Run rustfmt | |
| run: | | |
| cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| needs: [ frontend, format ] | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| SQLX_OFFLINE: true | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 | |
| with: | |
| shared-key: "checks" | |
| - name: Register rust problem matcher | |
| run: echo "::add-matcher::.github/problem-matchers/rust.json" | |
| - name: Download frontend asset folder | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: frontend | |
| path: frontend/dist | |
| - name: Run clippy | |
| run: cargo clippy --no-deps --all-targets --all-features -- --deny warnings | |
| deny: | |
| name: Check dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | |
| - uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918 |