WIP: refactor builder / rustwide integration #9264
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| env: | |
| RUST_CACHE_KEY: rust-cache-20241114 | |
| # disable incremental builds in CI, it's not needed | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| sqlx: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just,sqlx-cli,fd-find | |
| - name: restore build & cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: ${{ env.RUST_CACHE_KEY }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Test database migrations | |
| run: just test-database-migrations | |
| - name: shut down test environment | |
| if: ${{ always() }} | |
| run: just compose-down-and-wipe | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just | |
| - name: restore build & cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: ${{ env.RUST_CACHE_KEY }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: run tests | |
| run: just run-tests run-builder-tests | |
| - name: shut down test environment | |
| if: ${{ always() }} | |
| run: just compose-down-and-wipe | |
| GUI_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6 GB | |
| tool-cache: false | |
| # all of these default to true, but feel free to set to | |
| # "false" if our workflow needs parts | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Expose GitHub cache credentials | |
| uses: crazy-max/ghaction-github-runtime@v4 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just,sqlx-cli | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - name: Run end-to-end GUI tests | |
| env: | |
| # run all necessary admin commands from the docker images, as | |
| # we would in prod. | |
| DOCSRS_CLI_MODE: docker | |
| # run the preparation / builds for the e2e tests not | |
| # on the gh action host, but inside our builder docker image. | |
| # Like this we know this works. | |
| DOCSRS_BUILDER_CLI_MODE: docker | |
| run: just prepare-gui-tests run-gui-tests-e2e | |
| - name: shut down test environment | |
| if: ${{ always() }} | |
| run: just compose-down-and-wipe | |
| lint-format: | |
| name: linters & formatters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just,fd-find,cargo-machete,cargo-udeps,cargo-sort@2.1.3 | |
| - name: Install actionlint | |
| run: | | |
| bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.12 "$RUNNER_TEMP" | |
| echo "$RUNNER_TEMP" >> "$GITHUB_PATH" | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: 2.9.6 | |
| - name: restore build & cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: linters-${{ env.RUST_CACHE_KEY }} | |
| - run: just format | |
| - run: just lint | |
| - run: just lint-dependencies-udeps |