forked from coding-boot-camp/github-actions-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 791 Bytes
/
main.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
# Name of workflow
name: Lint and Test workflow
# Trigger workflow on all pull requests
on:
pull_request:
branches:
- develop
- staging
- main
# Jobs to carry out
jobs:
test:
# Operating system to run job on
runs-on: ubuntu-latest
# Steps in job
steps:
# Get code from repo
- name: Checkout code
uses: actions/checkout@v1
- name: Use Node.js 21.x
uses: actions/setup-node@v1
with:
node-version: 21.x
# Install dependencies
- name: 🧰 Install Deps
run: npm install
# Run lint
- name: Run Lint
run: npm run lint
# Run build
- name: Run Build
run: npm run build
# Run tests
- name: Run Tests
run: npm run test