generated from StyleShit/create-typescript-package
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.28 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
name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: Lint, Test and Build
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 20.x
- name: Install Deps
run: npm ci
- name: Run Lint
run: npm run lint
- name: Run Format
run: npm run format:check
- name: Run Test
run: npm run test:coverage
- name: Cache build
id: cache-build
uses: actions/cache@v4
env:
cache-name: cache-build
with:
path: ./dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run Build
run: npm run build