Skip to content

Commit

Permalink
⚒ improve CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Sep 4, 2019
1 parent 4a40a72 commit 11d396f
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions .github/workflows/CI.yml
@@ -1,7 +1,7 @@
name: CI
on:
push:
branches: [master]
branches: [master, gha]
pull_request:
branches: [master]
schedule:
Expand All @@ -27,19 +27,54 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
eslint: [6.x, 5.x]
node: [12.x, 10.x, 8.x]
exclude:
# Run ESLint 5.x only on the latest Node.
- eslint: 5.x
# On Windows, run tests with only the latest environments.
- os: windows-latest
eslint: 6.x
node: 10.x
- os: windows-latest
eslint: 6.x
node: 8.x
- eslint: 5.x
- os: windows-latest
eslint: 5.x
node: 12.x
- os: windows-latest
eslint: 5.x
node: 10.x
- os: windows-latest
eslint: 5.x
node: 8.x
# On macOS, run tests with only the latest environments.
- os: macOS-latest
eslint: 6.x
node: 10.x
- os: macOS-latest
eslint: 6.x
node: 8.x
- os: macOS-latest
eslint: 5.x
node: 12.x
- os: macOS-latest
eslint: 5.x
node: 10.x
- os: macOS-latest
eslint: 5.x
node: 8.x
# Run ESLint 5.x tests on only the latest Node.
- os: ubuntu-latest
eslint: 5.x
node: 10.x
- os: ubuntu-latest
eslint: 5.x
node: 8.x

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -52,10 +87,10 @@ jobs:
- name: Install Packages
run: npm install
- name: Install ESLint ${{ matrix.eslint }}
run: |
# We need to execute this command twice because of npm's bug.
# See also: https://npm.community/t/error-node-modules-staging-eslint-e7cf6846-node-modules-eslint
npm install --no-save eslint@${{ matrix.eslint }}
# We need to execute this command twice because of npm's bug.
# See also: https://npm.community/t/error-node-modules-staging-eslint-e7cf6846-node-modules-eslint
run: >
npm install --no-save eslint@${{ matrix.eslint }} &&
npm install --no-save eslint@${{ matrix.eslint }}
- name: Test
run: npm run -s test:ci
Expand Down

0 comments on commit 11d396f

Please sign in to comment.