From 768ef7d9ec33a493088af311f7ed62e61595dc60 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Mon, 31 Mar 2025 14:53:03 +0200 Subject: [PATCH] ci: run audit in a separate workflow --- .github/workflows/audit.yml | 52 ++++++++++++++++++++++++++++++++ .github/workflows/build-test.yml | 23 -------------- 2 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/audit.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 000000000..72e2beda6 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,52 @@ +name: Audit + +on: + pull_request: + workflow_dispatch: + schedule: + # Monday at 10am + - cron: '0 10 * * 1' + +jobs: + install: + name: Install on Node.js v${{ matrix.node-version }} + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install node_modules + uses: OffchainLabs/actions/node-modules/install@main + with: + cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo + + audit: + name: Audit on Node.js v${{ matrix.node-version }} + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20] + needs: install + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install node_modules + uses: OffchainLabs/actions/node-modules/install@main + with: + cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo + + - run: yarn audit:ci diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d203abcdb..95c08666c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -79,29 +79,6 @@ jobs: fail_ci_if_error: false verbose: false - audit: - name: Audit on Node.js v${{ matrix.node-version }} - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18, 20] - needs: install - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install node_modules - uses: OffchainLabs/actions/node-modules/install@main - with: - cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo - - - run: yarn audit:ci - test-unit: name: Test (Unit) on Node.js v${{ matrix.node-version }} runs-on: ubuntu-latest