diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d054479 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: main + +on: + push: + branches: [main] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: yarn + + - name: Install dependencies + run: yarn + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: | + packages/**/*.{nr,toml} + + - if: steps.changed-files.outputs.any_changed == 'true' + name: Install Nargo + uses: noir-lang/noirup@v0.1.3 + with: + toolchain: 0.26.0 + + - if: steps.changed-files.outputs.any_changed == 'true' + name: Test circuits + run: yarn test diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 491d0b8..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: tests - -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: yarn - - - name: Install dependencies - run: yarn - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v44 - with: - files: | - packages/**/*.{nr,toml} - - - if: steps.changed-files.outputs.any_changed == 'true' - name: Install Nargo - uses: noir-lang/noirup@v0.1.3 - with: - toolchain: 0.26.0 - - - if: steps.changed-files.outputs.any_changed == 'true' - name: Test circuits - run: yarn test