-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (55 loc) · 1.65 KB
/
check.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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: check
on:
push:
branches: main
pull_request:
branches: "*"
jobs:
check:
name: check
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Validate package.json
run: |
node -e "JSON.parse(require('fs').readFileSync('package.json','utf8'))"
- name: Clear Yarn Cache
run: yarn cache clean
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Audit Dependencies
run: yarn audit
continue-on-error: true
- name: Test Project
run: yarn run test
- name: Check liniting
run: yarn run lint:ci
continue-on-error: true
- name: Build Project
run: yarn run build
- name: Download ScanCode Toolkit
run: |
curl -L -o scancode-toolkit.tar.gz https://github.com/aboutcode-org/scancode-toolkit/releases/download/v32.3.0/scancode-toolkit-v32.3.0_py3.12-linux.tar.gz
mkdir -p scancode-toolkit
tar -xzf scancode-toolkit.tar.gz -C scancode-toolkit --strip-components=1
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Run ScanCode
run: |
cd scancode-toolkit
./scancode --json-pp ../scancode-result.json ../
- name: Upload ScanCode Results
uses: actions/upload-artifact@v4
with:
name: scancode-results
path: scancode-result.json