-
Notifications
You must be signed in to change notification settings - Fork 39
49 lines (41 loc) · 1.27 KB
/
core-web.unit.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
name: CORE WEB - Unit Tests
on:
workflow_dispatch:
pull_request:
paths:
- services/common/**
- services/core-web/**
jobs:
tests-unit-frontend:
name: tests-unit-frontend
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
name: checkout
- uses: actions/cache@v3
name: Cache yarn
with:
path: ./.yarn/cache
key: mds-core-web
restore-keys: mds-core-web
- uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Upgrade yarn
run: npm install -g yarn
- name: Set Fontawesome token
run: |
yarn config set 'npmScopes["fortawesome"].npmAuthIdent' "${{ secrets.ARTIFACTORY_TOKEN }}"
yarn config set 'npmScopes["fortawesome"].npmAlwaysAuth' true
yarn config set 'npmScopes["fortawesome"].npmRegistryServer' "https://artifacts.developer.gov.bc.ca/artifactory/api/npm/m4c2-mds/"
- name: Install Dependencies
run: yarn install
- name: Run frontend tests
run: cd services/core-web/ && yarn && yarn test
run-sonar-scan:
name: Run SonarCloud Scan
if: success()
uses: ./.github/workflows/sonarcloud-scan.yaml
with:
project-dir: services/core-web
secrets: inherit