|
| 1 | +name: CI |
| 2 | + |
| 3 | +env: |
| 4 | + TYPOS_LINK: "https://github.com/crate-ci/typos/releases/download" |
| 5 | + TYPOS_VERSION: "1.23.4" |
| 6 | + |
| 7 | +on: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + pull_request: {} |
| 11 | + |
| 12 | +jobs: |
| 13 | + crates: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + # -------------------------------------------------------------------------------- |
| 18 | + - uses: dtolnay/rust-toolchain@master |
| 19 | + with: |
| 20 | + components: clippy, rustfmt |
| 21 | + toolchain: stable |
| 22 | + # -------------------------------------------------------------------------------- |
| 23 | + - uses: Swatinem/rust-cache@v2 |
| 24 | + # -------------------------------------------------------------------------------- |
| 25 | + - name: Audit |
| 26 | + run: cargo xtask check audit |
| 27 | + # -------------------------------------------------------------------------------- |
| 28 | + - name: Format |
| 29 | + shell: bash |
| 30 | + env: |
| 31 | + # work around for colors |
| 32 | + # see: https://github.com/rust-lang/rustfmt/issues/3385 |
| 33 | + TERM: xterm-256color |
| 34 | + run: cargo xtask check format |
| 35 | + # -------------------------------------------------------------------------------- |
| 36 | + - name: Lint |
| 37 | + run: cargo xtask check lint |
| 38 | + # -------------------------------------------------------------------------------- |
| 39 | + - name: Typos |
| 40 | + uses: tracel-ai/github-actions/actions/check-typos@v1 |
| 41 | + # -------------------------------------------------------------------------------- |
| 42 | + - name: Build |
| 43 | + run: cargo xtask build |
| 44 | + # -------------------------------------------------------------------------------- |
| 45 | + - name: Unit Tests |
| 46 | + run: cargo xtask test unit |
| 47 | + # -------------------------------------------------------------------------------- |
| 48 | + - name: Integration Tests |
| 49 | + run: cargo xtask test integration |
| 50 | + # -------------------------------------------------------------------------------- |
| 51 | + - name: Documentation Tests |
| 52 | + run: cargo xtask doc tests |
| 53 | + |
0 commit comments