-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (39 loc) · 1.14 KB
/
tests.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
name: Tests
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
checkChangedFiles:
runs-on: ubuntu-latest
outputs:
files: ${{ steps.files.outputs.added_modified }}
steps:
- uses: actions/checkout@v2
- id: files
uses: Ana06/[email protected]
with:
format: 'csv'
filter: '*.mdx?'
test:
runs-on: ubuntu-latest
needs: checkChangedFiles
if: ${{ needs.checkChangedFiles.outputs.files != '' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- run: npm ci
- run: npm run test -- --reporter JSON --reporter-option output=mocha-results.json --filesToCheck=${{ needs.checkChangedFiles.outputs.files }}
continue-on-error: true
- uses: actions/upload-artifact@v2
with:
name: mocha-results
path: mocha-results.json
- uses: dorny/test-reporter@v1
with:
artifact: mocha-results
name: mocha-results
path: 'artifacts\mocha-results.json'
reporter: mocha-json
only-summary: 'false'