Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: CI
2
3 on: [push, pull_request]
4
5 jobs:
6 test:
7 runs-on: ubuntu-latest
8 strategy:
9 matrix:
10 node-version:
11 - 12.x
12 - 14.x
13 - 16.x
14 - 18.x
15 steps:
16 - name: Use Node.js ${{ matrix.node-version }}
17 uses: actions/setup-node@v2
18 with:
19 node-version: ${{ matrix.node-version }}
20 - uses: actions/checkout@v2
21 - run: npm ci --ignore-scripts
22 - run: npm run build
23 - run: npm run lint
24 - run: npm run test
25 - run: npm run spec-turtle
26 - run: npm run spec-ntriples
27 - run: npm run spec-nquads
28 - run: npm run spec-trig
29 - run: npx nyc report --reporter=text-lcov > lcov.info
30 - uses: coverallsapp/github-action@master
31 with:
32 github-token: ${{ secrets.github_token }}
33 flag-name: run-${{ matrix.node-version }}
34 parallel: true
35 path-to-lcov: lcov.info
36
37 coveralls:
38 needs: test
39 runs-on: ubuntu-latest
40 steps:
41 - name: Consolidate test coverage from different jobs
42 uses: coverallsapp/github-action@master
43 with:
44 github-token: ${{ secrets.github_token }}
45 parallel-finished: true
46
47 docs:
48 runs-on: ubuntu-latest
49 steps:
50 - uses: actions/checkout@v2
51 - uses: actions/setup-node@v2
52 with:
53 node-version: 14.x
54 - run: npm ci --ignore-scripts
55 - run: npm run docs
56 - uses: actions/upload-artifact@v2
57 with:
58 name: docs
59 path: |
60 index.html
61 docs
62 retention-days: 1
63
64 gh-pages:
65 needs:
66 - docs
67 - test
68 runs-on: ubuntu-latest
69 if: startsWith(github.ref, 'refs/tags/v')
70 steps:
71 - uses: actions/download-artifact@v2
72 with:
73 name: docs
74 - uses: peaceiris/actions-gh-pages@v3
75 with:
76 github_token: ${{ secrets.GITHUB_TOKEN }}
77 publish_dir: .