-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 2.26 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Running tests before merge to master
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-ui-testing:
runs-on: ${{matrix.os}}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [17.x]
steps:
- uses: actions/checkout@v2
- name: Staring Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install modules
run: npm ci --force
- name: build production project
run: npm run build:prod
if: always()
# Remove loki screenshot testing temporary bc of non-stable results
# - name: build storybook
# run: npm run storybook:build
# if: always()
# - name: screenshot testing
# run: npm run test:ui:ci
# if: always()
# - name: Generate HTML report
# run: npm run test:ui:report
# if: always()
# - name: Move loki
# run: mv .loki reports
# if: always()
- name: Run Unit Tests
run: npm run test:unit
if: always()
- name: Setup Pages
uses: actions/configure-pages@v2
if: always()
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
if: always()
with:
path: 'reports'
- name: Deploy to GitHub Pages
id: deployment
if: always()
uses: actions/deploy-pages@v1
checks:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [ 17.x ]
steps:
- uses: actions/checkout@v2
- name: Staring Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install modules
run: npm ci --force
- name: linting typescript
run: npm run lint:ts
if: always()
- name: linting css
run: npm run lint:scss
- name: unit testing
if: always()
run: npm run test:unit