-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.4 KB
/
test.yaml
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
name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# 16.12.0 has broken ESM support
node-version: ['12.x', '14.x', '16.11.x', '17.x']
include:
- os: windows-latest
node-version: '17.x'
- os: macos-latest
node-version: '17.x'
env:
ONE_REPORT_PROJECT_ID: ${{ secrets.ONE_REPORT_PROJECT_ID }}
ONE_REPORT_URL: ${{ secrets.ONE_REPORT_URL }}
ONE_REPORT_REFRESH_TOKEN: ${{ secrets.ONE_REPORT_REFRESH_TOKEN }}
steps:
- name: set git core.autocrlf to 'input'
run: git config --global core.autocrlf input
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm test
- name: Publish Results to OneReport (CLI)
run: node bin/one-report-publisher.cjs --reports "tmp/tests/*.{json,xml}"
- name: Publish Results to OneReport (GitHub Action)
if: ${{ always() }}
# uses: smartbear/[email protected]
uses: ./
with:
reports: tmp/tests/*.{json,xml}
- run: npm run eslint
- run: npm run build