Skip to content

chore(CI): simplify testing strategy #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 55 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,77 @@
name: CI
on:
push: {}
pull_request: {}
push:
pull_request:

jobs:
main:
lint:
name: ⬣ Lint
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: 📥 Install dependencies
run: npm install

- name: ▶️ Run lint script
run: npm run lint

test:
name:
🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{
matrix.os }})
strategy:
matrix:
eslint: [7, 8]
node: [12.22.0, 12, 14.17.0, 14, 16, 18]
runs-on: ubuntu-latest
eslint: [8]
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18]
os: [ubuntu-latest]
include:
# On other platforms
- os: windows-latest
eslint: 8
node: 18
- os: macos-latest
eslint: 8
node: 18
# On old ESLint versions
- eslint: 7
node: 18
os: ubuntu-latest
# On the minimum supported ESLint/Node.js version
- eslint: 7.0.0
node: 12.22.0
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.1
uses: styfle/cancel-workflow-action@0.11.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
- name: ⎔ Setup Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
node-version: ${{ matrix.node }}

- name: 📥 Download deps
- name: 📥 Install dependencies
run: npm ci

- name: 📥 Install ESLint v${{ matrix.eslint }}
run: npm install eslint@${{ matrix.eslint }}

- name: ▶️ Run test script
run: npm run test -- --runInBand

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v3
Loading