-
Notifications
You must be signed in to change notification settings - Fork 14
39 lines (37 loc) · 918 Bytes
/
main.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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [19.x, 18.x, 16.x, 15.x, 14.x]
steps:
- uses: actions/checkout@v3
- name: Configure ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install -g npm@latest
- run: npm ci
- run: npm test
env:
AKISMET_KEY: ${{ secrets.AKISMET_KEY }}
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: all supported versions
needs: [node]
steps:
- run: |
result="${{ needs.node.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi