-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (56 loc) · 1.94 KB
/
nerd-stuff.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
name: Nerd Stuff
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
report:
strategy:
matrix:
node-version: [16.x]
runs-on: ubuntu-latest
env:
working-directory: ./extension/
NAB_DISABLE_TELEMETRY: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
working-directory: ${{env.working-directory}}
- run: npx prettier --check .
working-directory: ${{env.working-directory}}
- name: Check Circular Dependencies
run: |
node node_modules/madge/bin/cli.js --warning --circular --extensions ts src/extension.ts
node node_modules/madge/bin/cli.js --warning --image dependency-graph-ts.svg --extensions ts src/extension.ts
working-directory: ${{env.working-directory}}
- name: Upload Dependency Graph
uses: actions/upload-artifact@v2
with:
name: dependency-graph-ts
path: ${{env.working-directory}}dependency-graph-ts.svg
retention-days: 7
- name: Run Tests
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:coverage
working-directory: ${{env.working-directory}}
- name: Generate Report
run: npx nyc report --reporter=lcov --check-coverage=false
working-directory: ${{env.working-directory}}
- name: Upload Report
uses: actions/upload-artifact@v2
with:
name: code-coverage
path: ${{env.working-directory}}.coverage/**
retention-days: 7
- name: Code Coverage
run: npx nyc report --reporter=lcov --reporter=text-summary --check-coverage
working-directory: ${{env.working-directory}}