From c2b6434a9d6a95760b1db11a9ecff6c22a1506f9 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 21 Jun 2024 14:43:46 -0700 Subject: [PATCH] [actions] clean up actions, expand test matrix --- .github/workflows/test.yml | 71 +++++++++++--------------------------- 1 file changed, 20 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c9994a..54f8310 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,75 +6,44 @@ on: - "!dependabot/**" pull_request: workflow_dispatch: + jobs: - jest: - name: Jest (Node v${{ matrix.node }}) - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - node: [14, 16, 17] - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Load Node version ${{ matrix.node }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - cache: npm - - name: Npm Install - run: npm ci - - name: Run Jest - run: npm run test:ci - - name: Run Coveralls - uses: coverallsapp/github-action@1.1.3 - if: matrix.node == '16' - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./reports/lcov.info + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 0.4' + type: majors + command: npm run tests-only + flow: name: Flow type checking runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Load Node - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@main with: - cache: npm - - name: Npm Install - run: npm ci + use-npm-ci: true - name: Flow type check run: npm run flow + eslint: - name: ESLint (Node v${{ matrix.node }}) + name: ESLint runs-on: ubuntu-latest - strategy: - matrix: - node: [16] steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Load Node version ${{ matrix.node }} - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@main with: - node-version: ${{ matrix.node }} - cache: npm - - name: Npm Install - run: npm ci + use-npm-ci: true - name: Run ESLint run: npm run lint + diff-breakUpAriaJSON: name: Compare JSON to src output runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Load Node version - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@main with: - cache: npm - - name: Npm Install - run: npm ci + use-npm-ci: true - name: Run diff check for the breakUpAriaJSON script run: node scripts/buildModelModules.js && git diff --exit-code -- src