|
1 | 1 | name: CI
|
2 | 2 | on:
|
3 | 3 | push:
|
4 |
| - branches: [main, gha] |
5 |
| - pull_request: |
6 | 4 | branches: [main]
|
| 5 | + pull_request: |
7 | 6 | schedule:
|
8 | 7 | - cron: 0 0 * * 0
|
9 | 8 |
|
10 | 9 | jobs:
|
11 | 10 | lint:
|
12 |
| - name: Lint |
| 11 | + name: ⬣ Lint |
13 | 12 | runs-on: ubuntu-latest
|
14 | 13 | steps:
|
15 |
| - - name: Checkout |
16 |
| - uses: actions/checkout@v2 |
17 |
| - - name: Install Node.js |
18 |
| - uses: actions/setup-node@v1 |
19 |
| - with: { node-version: 14.x } |
20 |
| - - name: Install Packages |
| 14 | + - name: 🛑 Cancel Previous Runs |
| 15 | + |
| 16 | + |
| 17 | + - name: ⬇️ Checkout repo |
| 18 | + uses: actions/checkout@v3 |
| 19 | + |
| 20 | + - name: ⎔ Setup Node |
| 21 | + uses: actions/setup-node@v3 |
| 22 | + with: |
| 23 | + node-version: 18 |
| 24 | + |
| 25 | + - name: 📥 Install dependencies |
21 | 26 | run: npm install
|
22 |
| - - name: Lint |
23 |
| - run: npm run -s lint |
| 27 | + |
| 28 | + - name: ▶️ Run lint script |
| 29 | + run: npm run lint |
24 | 30 |
|
25 | 31 | test:
|
26 |
| - name: Test |
| 32 | + name: |
| 33 | + 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ |
| 34 | + matrix.os }}) |
27 | 35 | strategy:
|
28 | 36 | matrix:
|
29 |
| - eslint: [7.x] |
30 |
| - node: [14.x] |
| 37 | + eslint: [7] |
| 38 | + node: [10, 12.0.0, 12, 14.0.0, 14, 16.0.0, 16, 18.0.0, 18] |
31 | 39 | os: [ubuntu-latest]
|
32 | 40 | include:
|
33 | 41 | # On other platforms
|
34 |
| - - eslint: 7.x |
35 |
| - node: 14.x |
36 |
| - os: windows-latest |
37 |
| - - eslint: 7.x |
38 |
| - node: 14.x |
39 |
| - os: macos-latest |
40 |
| - # On old Node.js versions |
41 |
| - - eslint: 7.x |
42 |
| - node: 12.x |
| 42 | + - os: windows-latest |
| 43 | + eslint: 7 |
| 44 | + node: 18 |
| 45 | + - os: macos-latest |
| 46 | + eslint: 7 |
| 47 | + node: 18 |
| 48 | + # On old ESLint versions |
| 49 | + - eslint: 6 |
| 50 | + node: 18 |
43 | 51 | os: ubuntu-latest
|
44 |
| - - eslint: 7.x |
45 |
| - node: 10.x |
| 52 | + - eslint: 5 |
| 53 | + node: 18 |
46 | 54 | os: ubuntu-latest
|
47 |
| - - eslint: 6.x |
48 |
| - node: 8.x |
| 55 | + - eslint: 4 |
| 56 | + node: 18 |
| 57 | + os: ubuntu-latest |
| 58 | + # On old Node.js versions |
| 59 | + - eslint: 6 |
| 60 | + node: 8 |
49 | 61 | os: ubuntu-latest
|
50 |
| - - eslint: 5.x |
51 |
| - node: 6.x |
| 62 | + - eslint: 5 |
| 63 | + node: 6 |
52 | 64 | os: ubuntu-latest
|
53 | 65 | # On the minimum supported ESLint/Node.js version
|
54 |
| - - eslint: "4.19.1" |
55 |
| - node: "6.5.0" |
| 66 | + - eslint: 4.19.1 |
| 67 | + node: 6.5.0 |
56 | 68 | os: ubuntu-latest
|
57 |
| - |
58 | 69 | runs-on: ${{ matrix.os }}
|
59 | 70 | steps:
|
60 |
| - - name: Checkout |
61 |
| - uses: actions/checkout@v2 |
62 |
| - - name: Install Node.js ${{ matrix.node }} |
63 |
| - uses: actions/setup-node@v1 |
64 |
| - with: { node-version: "${{ matrix.node }}" } |
65 |
| - - name: Install Packages for Node v6 |
| 71 | + - name: 🛑 Cancel Previous Runs |
| 72 | + |
| 73 | + |
| 74 | + - name: ⬇️ Checkout repo |
| 75 | + uses: actions/checkout@v3 |
| 76 | + |
| 77 | + - name: ⎔ Setup Node v${{ matrix.node }} |
| 78 | + uses: actions/setup-node@v3 |
| 79 | + with: |
| 80 | + node-version: ${{ matrix.node }} |
| 81 | + |
| 82 | + # - name: 📥 Install dependencies |
| 83 | + # run: npm install |
| 84 | + - name: 📥 Install Packages for Node v6 |
66 | 85 | run: |
|
67 | 86 |
|
68 | 87 | ./node_modules/.bin/npm -v
|
69 | 88 | ./node_modules/.bin/npm uninstall vuepress
|
70 | 89 | ./node_modules/.bin/npm install
|
71 |
| - if: ${{ matrix.node == '6.x' || matrix.node == '6.5.0' }} |
72 |
| - - name: Uninstall Packages for Node v8 |
| 90 | + if: ${{ matrix.node == '6.5.0' || matrix.node == '6' }} |
| 91 | + - name: 📥 Uninstall Packages for Node v8 |
73 | 92 | run: |
|
74 | 93 | npm uninstall vuepress
|
75 |
| - if: ${{ matrix.node == '8.x' }} |
76 |
| - - name: Install Packages |
77 |
| - run: npm install |
78 |
| - if: ${{ matrix.node != '6.x' && matrix.node != '6.5.0' }} |
79 |
| - - name: Install ESLint ${{ matrix.eslint }} for Node v6 |
80 |
| - run: ./node_modules/.bin/npm install --no-save eslint@${{ matrix.eslint }} |
81 |
| - if: ${{ matrix.node == '6.x' || matrix.node == '6.5.0' }} |
82 |
| - - name: Install ESLint ${{ matrix.eslint }} |
83 |
| - run: npm install --no-save eslint@${{ matrix.eslint }} |
84 |
| - if: ${{ matrix.node != '6.x' && matrix.node != '6.5.0' }} |
85 |
| - - name: Test |
86 |
| - run: npm run -s test:ci |
87 |
| - - name: Send Coverage |
88 |
| - run: npm run -s codecov |
89 |
| - env: |
90 |
| - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
91 |
| - if: ${{ matrix.node != '6.x' && matrix.node != '6.5.0' }} |
| 94 | + if: ${{ matrix.node == '8.O.O' || matrix.node == '8' }} |
| 95 | + - name: 📥 Install Packages |
| 96 | + run: npm install --legacy-peer-deps |
| 97 | + if: ${{ matrix.node != '6.5.0' && matrix.node != '6' }} |
| 98 | + |
| 99 | + # - name: 📥 Install ESLint v${{ matrix.eslint }} |
| 100 | + # run: npm install --save-dev eslint@${{ matrix.eslint }} |
| 101 | + - name: 📥 Install ESLint v${{ matrix.eslint }} for Node v6 |
| 102 | + run: ./node_modules/.bin/npm install --save-dev eslint@${{ matrix.eslint }} |
| 103 | + if: ${{ matrix.node == '6.5.0' || matrix.node == '6' }} |
| 104 | + - name: 📥 Install ESLint v${{ matrix.eslint }} |
| 105 | + run: npm install --save-dev eslint@${{ matrix.eslint }} |
| 106 | + if: ${{ matrix.node != '6.5.0' && matrix.node != '6' }} |
| 107 | + |
| 108 | + - name: ▶️ Run test script |
| 109 | + run: npm run test |
| 110 | + |
| 111 | + - name: ⬆️ Upload coverage report |
| 112 | + uses: codecov/codecov-action@v3 |
0 commit comments