set NX_NO_CLOUD #6
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| NX_NO_CLOUD: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: rust:1.88.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install rustfmt and clippy | |
| run: | | |
| rustup component add rustfmt clippy | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Cache Nx | |
| uses: actions/cache@v4 | |
| with: | |
| path: .nx | |
| key: ${{ runner.os }}-nx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-nx- | |
| - name: Cache cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Add node_modules/.bin to PATH | |
| run: echo "$PWD/node_modules/.bin" >> "$GITHUB_PATH" | |
| - name: Verify Nx installation | |
| run: nx --version | |
| - name: Download cargo dependencies | |
| run: cargo fetch --locked | |
| - name: Check formatting | |
| run: nx run cigen:format -- -- --check | |
| - name: Run linting | |
| run: nx run cigen:lint | |
| - name: Run tests | |
| run: nx run cigen:test | |
| - name: Build | |
| run: nx run cigen:build |