-
Notifications
You must be signed in to change notification settings - Fork 20
112 lines (108 loc) · 2.81 KB
/
tests.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Test
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
pages: write
id-token: write
deployments: write
jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm run build
- run: npm run lint
- run: npm run lint-no-output-globals
- run: npm run test-unit
- name: "Clean tree"
run: "npm run test-clean-tree"
integration:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
npm install
npm run build
- name: Cache docs output
id: docs-output
uses: actions/cache@v3
with:
path: docs
key: docs-output-${{ github.run_id }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: npm run playwright
# - run: npm run playwright-e2e
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: test-results
retention-days: 5
- run: npm run test-int-x
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report-pages
path: packages/special-pages/test-results
retention-days: 5
- name: Build docs
run: npm run docs
deploy-docs:
runs-on: ubuntu-20.04
needs: integration
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Cache build outputs
id: docs-output
uses: actions/cache@v3
with:
path: docs
key: docs-output-${{ github.run_id }}
- name: Setup Github Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1