|
1 | 1 | name: CI
|
2 | 2 | on:
|
3 |
| - push: |
4 |
| - branches: |
5 |
| - # default semantic-release branches |
6 |
| - - +([0-9])?(.{+([0-9]),x}).x |
7 |
| - - main |
8 |
| - - next |
9 |
| - - next-major |
10 |
| - - beta |
11 |
| - - alpha |
12 |
| - pull_request: |
13 |
| - schedule: |
14 |
| - - cron: 0 0 * * 0 |
| 3 | + push: |
| 4 | + branches: |
| 5 | + # default semantic-release branches |
| 6 | + - +([0-9])?(.{+([0-9]),x}).x |
| 7 | + - main |
| 8 | + - next |
| 9 | + - next-major |
| 10 | + - beta |
| 11 | + - alpha |
| 12 | + pull_request: |
| 13 | + schedule: |
| 14 | + - cron: 0 0 * * 0 |
15 | 15 |
|
16 | 16 | jobs:
|
17 |
| - lint: |
18 |
| - name: ⬣ Lint |
19 |
| - runs-on: ubuntu-latest |
20 |
| - steps: |
21 |
| - - name: 🛑 Cancel Previous Runs |
22 |
| - |
23 |
| - |
24 |
| - - name: ⬇️ Checkout repo |
25 |
| - uses: actions/checkout@v3 |
26 |
| - |
27 |
| - - name: ⎔ Setup Node |
28 |
| - uses: actions/setup-node@v3 |
29 |
| - with: |
30 |
| - node-version: 18 |
31 |
| - |
32 |
| - - name: 📥 Install dependencies |
33 |
| - run: npm install |
34 |
| - |
35 |
| - - name: ▶️ Run format:check script |
36 |
| - run: npm run format:check |
37 |
| - |
38 |
| - - name: ▶️ Run lint script |
39 |
| - run: npm run lint |
40 |
| - |
41 |
| - test: |
42 |
| - name: 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ |
43 |
| - matrix.os }}) |
44 |
| - strategy: |
45 |
| - matrix: |
46 |
| - eslint: [7] |
47 |
| - node: [10, 12.0.0, 12, 14.0.0, 14, 16, 18] # 10.0.0 is missing |
48 |
| - os: [ubuntu-latest] |
49 |
| - include: |
50 |
| - # On other platforms |
51 |
| - - os: windows-latest |
52 |
| - eslint: 7 |
53 |
| - node: 18 |
54 |
| - - os: macos-latest |
55 |
| - eslint: 7 |
56 |
| - node: 18 |
57 |
| - # On old ESLint versions |
58 |
| - - eslint: 6 |
59 |
| - node: 18 |
60 |
| - os: ubuntu-latest |
61 |
| - # - eslint: 5 |
62 |
| - # node: 18 |
63 |
| - # os: ubuntu-latest |
64 |
| - # On the minimum supported ESLint/Node.js version |
65 |
| - # - eslint: 5.0.0 |
66 |
| - # node: 10.0.0 |
67 |
| - # os: ubuntu-latest |
68 |
| - runs-on: ${{ matrix.os }} |
69 |
| - steps: |
70 |
| - - name: 🛑 Cancel Previous Runs |
71 |
| - |
72 |
| - |
73 |
| - - name: ⬇️ Checkout repo |
74 |
| - uses: actions/checkout@v3 |
75 |
| - |
76 |
| - - name: ⎔ Setup Node v${{ matrix.node }} |
77 |
| - uses: actions/setup-node@v3 |
78 |
| - with: |
79 |
| - node-version: ${{ matrix.node }} |
80 |
| - |
81 |
| - - name: 📥 Install dependencies |
82 |
| - run: npm install |
83 |
| - |
84 |
| - - name: 📥 Install ESLint v${{ matrix.eslint }} |
85 |
| - run: npm install --save-dev eslint@${{ matrix.eslint }} |
86 |
| - |
87 |
| - - name: 🏗 Build |
88 |
| - run: npm run build |
89 |
| - |
90 |
| - - name: ▶️ Run test script |
91 |
| - run: npm run test |
92 |
| - |
93 |
| - - name: ⬆️ Upload coverage report |
94 |
| - uses: codecov/codecov-action@v3 |
95 |
| - |
96 |
| - release: |
97 |
| - name: 🚀 Release |
98 |
| - needs: [lint, test] |
99 |
| - runs-on: ubuntu-latest |
100 |
| - if: github.repository == 'eslint-community/eslint-utils' && |
101 |
| - contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha', |
102 |
| - github.ref) && github.event_name == 'push' |
103 |
| - steps: |
104 |
| - - name: 🛑 Cancel Previous Runs |
105 |
| - |
106 |
| - |
107 |
| - - name: ⬇️ Checkout repo |
108 |
| - uses: actions/checkout@v3 |
109 |
| - |
110 |
| - - name: ⎔ Setup node |
111 |
| - uses: actions/setup-node@v3 |
112 |
| - with: |
113 |
| - node-version: 18 |
114 |
| - |
115 |
| - - name: 📥 Install dependencies |
116 |
| - run: npm install |
117 |
| - |
118 |
| - - name: 🏗 Build |
119 |
| - run: npm run build |
120 |
| - |
121 |
| - - name: 🚀 Release |
122 |
| - uses: cycjimmy/semantic-release-action@v3 |
123 |
| - with: |
124 |
| - semantic_version: 19 |
125 |
| - branches: | |
126 |
| - [ |
127 |
| - '+([0-9])?(.{+([0-9]),x}).x', |
128 |
| - 'main', |
129 |
| - 'next', |
130 |
| - 'next-major', |
131 |
| - {name: 'beta', prerelease: true}, |
132 |
| - {name: 'alpha', prerelease: true} |
133 |
| - ] |
134 |
| - env: |
135 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
136 |
| - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 17 | + lint: |
| 18 | + name: ⬣ Lint |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: 🛑 Cancel Previous Runs |
| 22 | + |
| 23 | + |
| 24 | + - name: ⬇️ Checkout repo |
| 25 | + uses: actions/checkout@v3 |
| 26 | + |
| 27 | + - name: ⎔ Setup Node |
| 28 | + uses: actions/setup-node@v3 |
| 29 | + with: |
| 30 | + node-version: 18 |
| 31 | + |
| 32 | + - name: 📥 Install dependencies |
| 33 | + run: npm install |
| 34 | + |
| 35 | + - name: ▶️ Run format:check script |
| 36 | + run: npm run format:check |
| 37 | + |
| 38 | + - name: ▶️ Run lint script |
| 39 | + run: npm run lint |
| 40 | + |
| 41 | + test: |
| 42 | + name: |
| 43 | + 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ |
| 44 | + matrix.os }}) |
| 45 | + strategy: |
| 46 | + matrix: |
| 47 | + eslint: [7] |
| 48 | + node: [10, 12.0.0, 12, 14.0.0, 14, 16, 18] # 10.0.0 is missing |
| 49 | + os: [ubuntu-latest] |
| 50 | + include: |
| 51 | + # On other platforms |
| 52 | + - os: windows-latest |
| 53 | + eslint: 7 |
| 54 | + node: 18 |
| 55 | + - os: macos-latest |
| 56 | + eslint: 7 |
| 57 | + node: 18 |
| 58 | + # On old ESLint versions |
| 59 | + - eslint: 6 |
| 60 | + node: 18 |
| 61 | + os: ubuntu-latest |
| 62 | + # - eslint: 5 |
| 63 | + # node: 18 |
| 64 | + # os: ubuntu-latest |
| 65 | + # On the minimum supported ESLint/Node.js version |
| 66 | + # - eslint: 5.0.0 |
| 67 | + # node: 10.0.0 |
| 68 | + # os: ubuntu-latest |
| 69 | + runs-on: ${{ matrix.os }} |
| 70 | + steps: |
| 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 | + |
| 85 | + - name: 📥 Install ESLint v${{ matrix.eslint }} |
| 86 | + run: npm install --save-dev eslint@${{ matrix.eslint }} |
| 87 | + |
| 88 | + - name: 🏗 Build |
| 89 | + run: npm run build |
| 90 | + |
| 91 | + - name: ▶️ Run test script |
| 92 | + run: npm run test |
| 93 | + |
| 94 | + - name: ⬆️ Upload coverage report |
| 95 | + uses: codecov/codecov-action@v3 |
| 96 | + |
| 97 | + release: |
| 98 | + name: 🚀 Release |
| 99 | + needs: [lint, test] |
| 100 | + runs-on: ubuntu-latest |
| 101 | + if: github.repository == 'eslint-community/eslint-utils' && |
| 102 | + contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha', |
| 103 | + github.ref) && github.event_name == 'push' |
| 104 | + steps: |
| 105 | + - name: 🛑 Cancel Previous Runs |
| 106 | + |
| 107 | + |
| 108 | + - name: ⬇️ Checkout repo |
| 109 | + uses: actions/checkout@v3 |
| 110 | + |
| 111 | + - name: ⎔ Setup node |
| 112 | + uses: actions/setup-node@v3 |
| 113 | + with: |
| 114 | + node-version: 18 |
| 115 | + |
| 116 | + - name: 📥 Install dependencies |
| 117 | + run: npm install |
| 118 | + |
| 119 | + - name: 🏗 Build |
| 120 | + run: npm run build |
| 121 | + |
| 122 | + - name: 🚀 Release |
| 123 | + uses: cycjimmy/semantic-release-action@v3 |
| 124 | + with: |
| 125 | + semantic_version: 19 |
| 126 | + branches: | |
| 127 | + [ |
| 128 | + '+([0-9])?(.{+([0-9]),x}).x', |
| 129 | + 'main', |
| 130 | + 'next', |
| 131 | + 'next-major', |
| 132 | + {name: 'beta', prerelease: true}, |
| 133 | + {name: 'alpha', prerelease: true} |
| 134 | + ] |
| 135 | + env: |
| 136 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 137 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments