generated from znckco/nestjs-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.45 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
fix-style:
name: Fix code style
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2-beta
- name: Setup PNPM
uses: pnpm/[email protected]
with:
version: "5"
run_install: |
- args: [--frozen-lockfile, --silent]
# TODO: Move this to znckco/actions/lint repo.
- name: Lint
uses: ./.github/actions/lint
with:
token: ${{ secrets.GITHUB_TOKEN }}
unit-test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
if: github.event_name == 'pull_request'
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2-beta
- name: Setup PNPM
uses: pnpm/[email protected]
with:
version: "5"
run_install: |
- args: [--frozen-lockfile, --silent]
- name: Test
run: |
pnpm test
bash <(curl -s https://codecov.io/bash)