Skip to content

docs: add design principles to README.md #39

docs: add design principles to README.md

docs: add design principles to README.md #39

Workflow file for this run

name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
format:
name: Format
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: ./.github/actions/install-base
- uses: ./.github/actions/setup-rust
- name: Check formatting
run: |
cargo fmt --all -- --check
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: ./.github/actions/install-base
- uses: ./.github/actions/setup-rust
- name: Run clippy
run: |
cargo matrix clippy
check:
name: Check
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
packages: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: ./.github/actions/install-base
- uses: ./.github/actions/setup-rust
- name: Check
run: |
cargo matrix check
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
packages: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: ./.github/actions/install-base
- uses: ./.github/actions/setup-rust
- name: Build Release
run: |
cargo matrix build
basics-checks:
name: Basic checks
needs: [format, lint, check]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
all-checks:
needs: [basics-checks, build]
# Override the default execution condition to prevent this job from being skipped
# if its dependencies fail. In GitHub Actions, a skipped job is considered successful,
# which is not the desired behavior here. Also, ensure the job does not run when
# the workflow is manually canceled.
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'