-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.19 KB
/
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
44
45
46
name: Pull Request and Dead Code Cleanup
on:
pull_request:
jobs:
install:
name: Installing packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn-lock') }}
- name: Install dependencies
run: yarn install
dead-code-cleanup:
name: Finding dead code
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn-lock') }}
- name: Clean dead code
run: yarn ts-prune --error
testing:
name: Unit tester
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn-lock') }}
- name: Run unit tests
run: yarn test