-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) Β· 1.07 KB
/
ci.yml
File metadata and controls
53 lines (42 loc) Β· 1.07 KB
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
name: ci
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.3
if: "github.ref != 'refs/heads/main'"
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Checkout π
uses: actions/checkout@master
- name: Setup node env π
uses: actions/setup-node@v2.5.1
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Next cache
uses: actions/cache@v3.0.1
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies π¨π»βπ»
run: npm ci
- name: Run linter π
run: npm run lint
- name: Build βοΈ
run: npm run build
- name: Run Unit Tests π§ͺ
run: npm run test