forked from Cal-CS-61A-Staff/seating
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.5 KB
/
audit.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
50
51
52
53
54
55
56
name: Audit
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
check-broken-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Audit with pip
# returns 1 if there are broken dependencies, 0 otherwise
# so, CI will fail if there are broken dependencies
run: |
pip check
check-package-updates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Audit with pip
# only informational, does not fail CI
run: |
pip list --outdated
audit-with-safety:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Audit with safety
# returns 255 if there are vulnerabilities, 0 otherwise
# we use `|| true` to make sure CI does not fail whatsoever
run: |
safety check || true
continue-on-error: true
audit-with-pip-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
# returns 1 if there are vulnerabilities, 0 otherwise
# we use `|| true` to make sure CI does not fail whatsoever
- name: Audit with pip-audit
run: |
pip-audit || true