|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, develop ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + schedule: |
| 9 | + # Run nightly to catch regressions |
| 10 | + - cron: '0 0 * * *' |
| 11 | + |
| 12 | +env: |
| 13 | + CARGO_TERM_COLOR: always |
| 14 | + RUST_BACKTRACE: 1 |
| 15 | + |
| 16 | +# TODO: Add Clippy and mock Funderberker testing |
| 17 | + |
| 18 | +jobs: |
| 19 | +check: |
| 20 | + name: Check |
| 21 | + runs-on: ubuntu-latest |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + crate: |
| 25 | + - macros |
| 26 | + - utils |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - uses: dtolnay/rust-toolchain@stable |
| 30 | + - uses: Swatinem/rust-cache@v2 |
| 31 | + with: |
| 32 | + key: crate-${{ matrix.crate }} |
| 33 | + - name: Check ${{ matrix.crate }} |
| 34 | + run: cargo +nightly check --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose |
| 35 | + |
| 36 | +unit-tests: |
| 37 | + name: Unit Test Individual Crates |
| 38 | + runs-on: ubuntu-latest |
| 39 | + strategy: |
| 40 | + matrix: |
| 41 | + crate: |
| 42 | + - macros |
| 43 | + - utils |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + - uses: dtolnay/rust-toolchain@stable |
| 47 | + - uses: Swatinem/rust-cache@v2 |
| 48 | + with: |
| 49 | + key: crate-${{ matrix.crate }} |
| 50 | + - name: Test ${{ matrix.crate }} |
| 51 | + run: cargo +nightly test --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose |
| 52 | + |
| 53 | +docs: |
| 54 | + name: Documentation |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v4 |
| 58 | + - uses: dtolnay/rust-toolchain@stable |
| 59 | + - uses: Swatinem/rust-cache@v2 |
| 60 | + - name: Build docs |
| 61 | + run: cargo doc --no-deps --all-features |
| 62 | + - name: Deploy to GitHub Pages |
| 63 | + if: github.ref == 'refs/heads/main' |
| 64 | + uses: peaceiris/actions-gh-pages@v3 |
| 65 | + with: |
| 66 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 67 | + publish_dir: ./target/doc |
| 68 | + |
0 commit comments