-
-
Notifications
You must be signed in to change notification settings - Fork 282
56 lines (48 loc) · 1.23 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
name: Continuous Integration Workflow
# This workflow is triggered whenever a new PR is created on the main branch
on:
pull_request:
branches:
- main
paths:
- 'web/**'
push:
branches:
- main
paths:
- 'web/**'
jobs:
# Run unit tests to make sure everything is 👍
test:
name: 'Run unit tests'
defaults:
run:
shell: bash
# Define the working directory for all run steps in the workflow
working-directory: ./web
# Specify the OS we want the workflow to run on
runs-on: ubuntu-latest
# Define the steps for this job
steps:
- uses: actions/checkout@v2
name: 'Checkout repository'
- name: 'Install Dependencies'
run: npm install
- name: 'Run Tests'
run: npm run test
# Run the linter to check for code style issues
lint:
name: 'Run linter'
defaults:
run:
shell: bash
# Define the working directory for all run steps in the workflow
working-directory: ./web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: 'Checkout repository'
- name: 'Install Dependencies'
run: npm install
- name: 'Run Linter'
run: npx standard -v