|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +permissions: |
| 7 | + contents: read |
| 8 | + |
| 9 | +jobs: |
| 10 | + smoke: |
| 11 | + name: Smoke tests |
| 12 | + runs-on: ubuntu-latest |
| 13 | + timeout-minutes: 5 |
| 14 | + steps: |
| 15 | + - name: Check out repository |
| 16 | + uses: actions/checkout@v6 |
| 17 | + |
| 18 | + - name: Install Nix |
| 19 | + uses: cachix/install-nix-action@v31 |
| 20 | + |
| 21 | + - name: Dry build SCE package |
| 22 | + run: nix build .#sce --dry-run --print-out-paths |
| 23 | + |
| 24 | + - name: Run pkl generated parity check |
| 25 | + run: nix run .#pkl-check-generated |
| 26 | + |
| 27 | + - name: Run agnix validate |
| 28 | + working-directory: config |
| 29 | + run: nix develop -c agnix validate . |
| 30 | + |
| 31 | + nix-flake-check: |
| 32 | + name: Nix flake check |
| 33 | + needs: smoke |
| 34 | + runs-on: ubuntu-latest |
| 35 | + timeout-minutes: 10 |
| 36 | + steps: |
| 37 | + - name: Check out repository |
| 38 | + uses: actions/checkout@v6 |
| 39 | + |
| 40 | + - name: Install Nix |
| 41 | + uses: cachix/install-nix-action@v31 |
| 42 | + |
| 43 | + - name: Run nix flake check |
| 44 | + run: nix flake check |
| 45 | + |
| 46 | + cli-macos: |
| 47 | + name: CLI tests (macOS) |
| 48 | + needs: smoke |
| 49 | + runs-on: macos-latest |
| 50 | + timeout-minutes: 10 |
| 51 | + steps: |
| 52 | + - name: Check out repository |
| 53 | + uses: actions/checkout@v6 |
| 54 | + |
| 55 | + - name: Install Nix |
| 56 | + uses: cachix/install-nix-action@v31 |
| 57 | + |
| 58 | + - name: Run CLI integration tests |
| 59 | + run: nix run .#cli-integration-tests |
| 60 | + |
| 61 | + cli-windows: |
| 62 | + name: CLI tests (Windows) |
| 63 | + needs: smoke |
| 64 | + runs-on: windows-latest |
| 65 | + timeout-minutes: 10 |
| 66 | + steps: |
| 67 | + - name: Check out repository |
| 68 | + uses: actions/checkout@v6 |
| 69 | + |
| 70 | + - name: Install Rust toolchain |
| 71 | + uses: dtolnay/rust-toolchain@stable |
| 72 | + with: |
| 73 | + components: clippy |
| 74 | + |
| 75 | + - name: Run clippy |
| 76 | + working-directory: cli |
| 77 | + run: cargo clippy --all-targets --all-features |
| 78 | + |
| 79 | + - name: Run setup integration tests |
| 80 | + working-directory: cli |
| 81 | + run: cargo test --test setup_integration |
| 82 | + |
| 83 | + token-count: |
| 84 | + name: Token count |
| 85 | + needs: smoke |
| 86 | + runs-on: ubuntu-latest |
| 87 | + timeout-minutes: 10 |
| 88 | + steps: |
| 89 | + - name: Check out repository |
| 90 | + uses: actions/checkout@v6 |
| 91 | + |
| 92 | + - name: Install Nix |
| 93 | + uses: cachix/install-nix-action@v31 |
| 94 | + |
| 95 | + - name: Run workflow token-count |
| 96 | + run: nix run .#token-count-workflows |
| 97 | + |
| 98 | + - name: Upload token-count artifacts |
| 99 | + uses: actions/upload-artifact@v4 |
| 100 | + with: |
| 101 | + name: workflow-token-footprint |
| 102 | + path: | |
| 103 | + context/tmp/token-footprint/workflow-token-count-latest.json |
| 104 | + context/tmp/token-footprint/workflow-token-count-latest.md |
| 105 | + context/tmp/token-footprint/workflow-token-count-*.json |
| 106 | + context/tmp/token-footprint/workflow-token-count-*.md |
| 107 | + if-no-files-found: error |
0 commit comments