Update actions/checkout action to v6 #1333
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: Test | |
| on: | |
| pull_request: | |
| merge_group: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| env: | |
| # Matches docker-compose.yaml | |
| DATABASE_URL: postgres://bors:bors@localhost:5432/bors | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Start containers | |
| run: docker compose up -d --wait | |
| - name: Install stable toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: 1.88.0 | |
| components: clippy, rustfmt | |
| - name: Install sqlx-cli | |
| run: cargo install [email protected] --locked --no-default-features --features native-tls,postgres | |
| - name: Run SQLx migrations | |
| run: cargo sqlx database create && sqlx migrate run | |
| - name: Check .sqlx files | |
| run: cargo sqlx prepare --check -- --all-targets | |
| - name: Build | |
| run: cargo build --workspace --all-targets --locked | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Lint code | |
| run: cargo clippy --workspace --all-targets | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| docker: | |
| name: Test Docker | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build the Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: bors | |
| load: true | |
| - name: Run Docker image | |
| run: docker run bors --help |