63 lines (54 loc) · 1.78 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
ci:
name: 'Test: Node ${{ matrix.node-version }} - ESLint ${{ matrix.eslint-version }} - GraphQL ${{ matrix.test-graphql }}'
runs-on: ubuntu-latest
strategy:
matrix:
eslint-version: ['^8.0.0-0', 7, 6, 5]
node-version: [16, 14, 12, 10, 8, 6]
test-graphql: [true, false]
exclude:
# ESLint 8 does not support node 6, 8 or 10
- eslint-version: '^8.0.0-0'
node-version: 10
- eslint-version: '^8.0.0-0'
node-version: 8
- eslint-version: '^8.0.0-0'
node-version: 6
# ESLint 7 does not support node 6 or 8
- eslint-version: 7
node-version: 8
- eslint-version: 7
node-version: 6
# ESLint 6 does not support node 6
# the version of chalk used in ESLint 6 does not support node 8
- eslint-version: 6
node-version: 8
- eslint-version: 6
node-version: 6
# @graphql-eslint/eslint-plugin does not support node 6, 8 or 10
- test-graphql: true
node-version: 10
- test-graphql: true
node-version: 8
- test-graphql: true
node-version: 6
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Use ESLint ${{ matrix.eslint-version }}
run: yarn upgrade eslint@${{ matrix.eslint-version }}
- name: Install
run: yarn install
- if: matrix.test-graphql == true
run: yarn add -D @graphql-eslint/eslint-plugin graphql
- name: Test
run: yarn run test