This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (58 loc) · 1.72 KB
/
frontend-code.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
name: Frontend Code
on:
push:
pull_request:
jobs:
test:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
name: Frontend Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Node Action
uses: actions/[email protected]
with:
node-version: 18.x
cache: "npm"
cache-dependency-path: frontend/
- name: yarn install
uses: borales/[email protected]
with:
cmd: install
dir: "frontend"
- name: yarn test
uses: borales/[email protected]
with:
cmd: test --passWithNoTests
dir: "frontend"
lint:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
name: Lint and Format
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Node Action
uses: actions/[email protected]
with:
node-version: 18.x
cache: "npm"
cache-dependency-path: frontend/
- name: yarn install
uses: borales/[email protected]
with:
cmd: install
dir: "frontend"
- name: yarn eslint-lint
uses: borales/[email protected]
with:
cmd: eslint-lint
dir: "frontend"
- name: yarn format
uses: borales/[email protected]
with:
cmd: format
dir: "frontend"