-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.42 KB
/
ci-frontend.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
name: CI Frontend
on:
push:
workflow_call:
workflow_dispatch:
env:
NODE_VERSION: 18
PNPM_VERSION: 8
WORKING_DIRECTORY: frontend
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-pnpm-node
- name: Run prettier and eslint
run: pnpm lint
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-pnpm-node
- name: Build Frontend
run: pnpm build
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-pnpm-node
- name: Store Playwright version
shell: bash
run: echo "PLAYWRIGHT_VERSION=$(pnpm exec playwright --version | awk '{ print $2 }')" >> $GITHUB_ENV
- uses: ./.github/actions/setup-playwright
- name: Test Frontend
run: pnpm test
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-pnpm-node
- name: Check Frontend
run: |
pnpm build
pnpm check