-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (83 loc) · 2.13 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
85
name: linting, testing, building
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
pipeline:
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
strategy:
matrix:
node-version: [ 17.x ]
steps:
- uses: actions/checkout@v2
- name: Starting 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
if: always()
run: npm run build:prod
- name: Build storybook
if: always()
run: npm run storybook:build
- name: Screenshot testing
if: always()
run: npm run test:ui:ci
- name: Unit testing
if: always()
run: npm run test:unit
- name: Generate HTML report
if: always()
run: npm run test:ui:report
- name: Move loki
if: always()
run: mv .loki reports/
- name: Setup Pages
if: always()
uses: actions/configure-pages@v2
- name: Upload artifact
if: always()
uses: actions/upload-pages-artifact@v1
with:
path: 'reports'
- name: Deploy to GitHub Pages
id: deployment
if: always()
uses: actions/deploy-pages@v1
checks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 17.x ]
steps:
- uses: actions/checkout@v2
- name: Starting 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
if: always()
run: npm run lint:ts
- name: Linting scss
if: always()
run: npm run lint:scss
- name: Unit testing
if: always()
run: npm run test:unit