-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (84 loc) · 2.55 KB
/
pr.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
on: pull_request
name: Review
jobs:
templates-build:
name: Templates build
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: yarn
- name: Build production assets
run: yarn build
templates-coding-standards:
name: Templates coding standards
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: yarn
- name: React coding standards
run: yarn check-coding-standards-actions
cypress:
name: Cypress
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: ["chrome"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup network
run: docker network create frontend
- name: Install client
run: docker compose run node yarn
- name: Cypress run components
run: docker compose run cypress run --component --browser ${{ matrix.browser }}
- name: Cypress run e2e
run: docker compose run cypress run --browser ${{ matrix.browser }}
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: cypress-screenhosts-${{ matrix.browser }}
path: cypress/screenshots
retention-days: 7
changelog:
runs-on: ubuntu-20.04
name: Changelog should be updated
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Git fetch
run: git fetch
- name: Check that changelog has been updated.
run: git diff --exit-code origin/develop -- CHANGELOG.md && exit 1 || exit 0