-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.34 KB
/
app-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
name: app-ci
run-name: ${{ github.actor }} is executing ${{ github.workflow }} on ${{ github.event_name }} at ${{ github.sha }}
on:
pull_request:
branches:
- main
paths:
- front/**
defaults:
run:
working-directory: front
jobs:
app-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
- name: Ensure npm is not used
run: |
if [ -f "package-lock.json" ] ; then
echo "package-lock.json found! Make sure you are using yarn to manage dependencies, not npm."
exit 1
fi
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: borales/actions-yarn@v4
with:
cmd: --cwd front install # front/yarn install
- name: Check linting
uses: borales/actions-yarn@v4
with:
cmd: --cwd front lint # front/yarn lint
- name: Format code
uses: borales/actions-yarn@v4
with:
cmd: --cwd front format # front/yarn format
- name: Check tests
uses: borales/actions-yarn@v4
with:
cmd: --cwd front test # front/yarn test
- name: Check build
uses: borales/actions-yarn@v4
with:
cmd: --cwd front test # front/yarn build