This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (84 loc) · 2.59 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
name: ci
on:
push:
branches:
- '**'
tags: ['v*.*.*']
pull_request:
types:
- 'opened'
- 'synchronize'
- 'reopened'
- 'labeled'
merge_group:
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
if: ${{ github.event.action != 'labeled' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies 📦
run: yarn install --immutable
- name: Lint files
run: yarn run lint
- name: Run tests
run: yarn test
- name: Run build
run: yarn run build
docker:
uses: reims2/actions/.github/workflows/docker.yml@main
concurrency: docker-frontend-${{ github.ref }}
if: ${{ github.event_name != 'merge_group' && github.event.action != 'labeled' }}
secrets: inherit # pass all secrets
deploy:
needs:
- docker
- ci
if: github.ref == 'refs/heads/main'
uses: reims2/actions/.github/workflows/deploy.yml@main
concurrency: deploy-${{ github.repository }}
secrets: inherit # pass all secrets
dev-deploy:
needs:
- docker
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/dev'
uses: reims2/actions/.github/workflows/dev-deploy.yml@main
concurrency: dev-deploy-${{ github.repository }}
secrets: inherit # pass all secrets
pr-deploy:
needs:
- docker
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy')) }}
uses: reims2/actions/.github/workflows/deploy-instance.yml@main
concurrency: pr-deploy-frontend-${{ github.ref }}
with:
instance_name: frontend-pr-${{ github.event.number || 'unknown' }}
secrets: inherit # pass all secrets
e2e:
needs:
- deploy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30