-
-
Notifications
You must be signed in to change notification settings - Fork 156
82 lines (67 loc) · 1.83 KB
/
dev.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: dev
on:
pull_request:
push:
branches:
- master
- main
env:
CI: true
jobs:
prettier:
name: Format code
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prettier
uses: gulpjs/[email protected]
with:
commit_message: 'chore: Run prettier'
prettier_options: '--write .'
test:
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Set Node.js version
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm --version
- name: Install npm dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Prepare files
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
find test -type d -exec chmod g+s {} \;
sudo chown root test/fixtures/not-owned/not-owned.txt
sudo chmod 666 test/fixtures/not-owned/not-owned.txt
- name: Run tests
run: npm test
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
parallel: true
coveralls:
needs: test
name: Finish up
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true