fix(dev): fix pre-commit hook link #32
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: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| workflow_call: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-24.04 | |
| container: fedora:42 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install rust toolchain | |
| id: toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Prerequisites | |
| run: | | |
| dnf install -y just lsb_release | |
| just ci=true prerequisites-dev | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| env: | |
| SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
| with: | |
| path: | | |
| _mesonbuild/cargo-home/bin/ | |
| _mesonbuild/cargo-home/registry/index/ | |
| _mesonbuild/cargo-home/registry/cache/ | |
| _mesonbuild/cargo-home/git/db/ | |
| _mesonbuild/target/ | |
| key: "cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}- | |
| ${{ hashFiles('**/Cargo.lock') }}-${{ github.workflow_sha }}" | |
| restore-keys: cargo-${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }} | |
| - name: Setup | |
| run: just ci=true setup-dev | |
| - name: Fmt-check | |
| run: just ci=true fmt-check | |
| - name: Build | |
| run: just ci=true build | |
| - name: Install | |
| run: just ci=true install | |
| - name: Test | |
| run: just ci=true test | |
| - name: Test file compatibility | |
| run: just ci=true test-file-compatibility | |
| - name: Lint | |
| run: just ci=true lint | |
| continue-on-error: true | |
| - name: Upload test report | |
| uses: actions/upload-artifact@v4 | |
| if: success() || failure() | |
| with: | |
| name: test-results | |
| path: target/nextest/ci/test-report-junit.xml |