more miette pretty printing fixes #5712
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: Cargo Build & Test | |
| on: | |
| pull_request: | |
| # Declare default permissions as read only. | |
| # Apparently, actions/upload-artifact does not need write permissions. | |
| # See: https://github.com/actions/upload-artifact/issues/197 | |
| permissions: read-all | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_and_test: | |
| uses: ./.github/workflows/build_and_test.yml | |
| with: | |
| collect_coverage: true | |
| check_coverage: | |
| name: Check coverage criteria | |
| needs: build_and_test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ./.github/actions/create_coverage_comment | |
| with: | |
| threshold: 0.8 | |
| cargo_semver_checks: | |
| name: Cargo SemVer Checks | |
| runs-on: ubuntu-latest | |
| # Make this check mandatory for release branches. | |
| continue-on-error: ${{ !startsWith(github.base_ref, 'release/') }} | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - name: Check out head (${{ github.head_ref }}) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| path: head | |
| # Pull requests to non-release branches are checked for SemVer breakage | |
| # relative to their target branch. | |
| - if: ${{ !startsWith(github.base_ref, 'release/') }} | |
| name: Check out base (${{ github.base_ref }}) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| path: base | |
| # If this is a release PR, check SemVer relative to the highest version | |
| # published to crates.io <= the version from head. | |
| - if: ${{ startsWith(github.base_ref, 'release/') }} | |
| name: Check out base (from crates.io) | |
| run: head/.github/scripts/check-out-base-from-crates-io.sh | |
| shell: bash | |
| # `cargo semver-checks` doesn't understand `rlib` crates. | |
| - run: >- | |
| sed -i -E 's/^(crate-type = \["rlib", "cdylib"\]|crate-type = \["rlib"\])$/crate-type = ["lib"]/' {head,base}/cedar-policy/Cargo.toml | |
| - run: sudo apt-get update && sudo apt-get install protobuf-compiler | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: cargo install cargo-semver-checks --locked | |
| - run: cargo semver-checks check-release --package cedar-policy --baseline-root ../base | |
| working-directory: head |