-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.87 KB
/
test.yml
File metadata and controls
69 lines (60 loc) · 1.87 KB
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
name: 'Run Tests'
on:
pull_request:
branches: [ feature/**, review/**,master ]
paths-ignore:
- '**/README.md'
- '**/blueprint.json'
- '**/blueprint.md'
push:
branches: [ feature/**, review/**,master ]
paths-ignore:
- '**/README.md'
- '**/blueprint.json'
- '**/blueprint.md'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node-version: [12, 14]
steps:
- uses: actions/checkout@v2
- name: Cache Node modules
id: node-Cache
uses: actions/cache@v2
with:
path: |
**/node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v1
with:
node-version: ${{matrix.node-version}}
- run: |
npm install -g npq --ignore-scripts
npq install
npm run test
- name: SonarCloud Scan
# Skip sonarcloud scan for dependabot for now
if: github.actor != 'dependabot[bot]' || github.actor != 'dependabot-preview[bot]'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Cypress run
uses: cypress-io/github-action@v2
with:
#build: npm run build
start: npm start
project: ./e2e
record: true
wait-on: 'http://localhost:4200'
wait-on-timeout: 500
#cache-key: node-modules-${{ hashFiles('package-lock.json') }}
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}