-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (83 loc) · 2.52 KB
/
ci.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
name: Continuos Integration
on:
push:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: install
run: npm ci
- name: eslint
run: npm run lint
- name: build
run: npm run build
test_unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: install
run: npm ci
- name: test
run: npm run test
test_visual:
name: Visual
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
publish:
name: Publish
timeout-minutes: 2
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
pages: write
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.GITHUB_TOKEN }}
- name: build docs
# if: ${{ steps.release.outputs.release_created }}
run: |
npm run build:docs
- name: Setup Pages
# if: ${{ steps.release.outputs.release_created }}
uses: actions/configure-pages@v4
- name: upload docs artifact
# if: ${{ steps.release.outputs.release_created }}
uses: actions/upload-pages-artifact@v2
- name: deploy docs artifact
# if: ${{ steps.release.outputs.release_created }}
uses: actions/deploy-pages@v3
needs: [test_unit, test_visual, build]
if: github.ref_name == 'main'