Skip to content

Commit

Permalink
chore(CI): support testing against multiple ESLint versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Dec 13, 2021
1 parent 8e04368 commit 35376c0
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: validate
on:
push:
branches:
- '+([0-9])?(.{+([0-9]),x}).x'
- 'main'
- 'next'
- 'next-major'
- 'beta'
- 'alpha'
- '!all-contributors/**'
- "+([0-9])?(.{+([0-9]),x}).x"
- "main"
- "next"
- "next-major"
- "beta"
- "alpha"
- "!all-contributors/**"
pull_request: {}
jobs:
main:
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}
strategy:
matrix:
eslint: [6.8.0, 6, 7.0.0, 7]
node: [12, 14, 16]
runs-on: ubuntu-latest
steps:
Expand All @@ -35,6 +36,9 @@ jobs:
with:
useLockFile: false

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

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

Expand All @@ -44,8 +48,7 @@ jobs:
release:
needs: main
runs-on: ubuntu-latest
if:
${{ github.repository == 'testing-library/eslint-plugin-jest-dom' &&
if: ${{ github.repository == 'testing-library/eslint-plugin-jest-dom' &&
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
Expand Down Expand Up @@ -73,7 +76,7 @@ jobs:
- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
semantic_version: 18
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
Expand Down

0 comments on commit 35376c0

Please sign in to comment.