-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.01 KB
/
safety.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
name: Safety Checks
on:
# trigger this workflow manually
workflow_dispatch:
# or on a schedule
# runs in utc at 2:30am on Mondays
# this is 7:30pm on Sundays in Seattle
schedule:
- cron: "15 2 * * 1"
# also run on pull requests
# probably best to make this a required check on pull requests
pull_request:
jobs:
safety:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12.x"
cache: "pip"
- name: Cache safety database
uses: actions/cache@v4
with:
path: ~/.safety
key: safety
- name: Install safety
run: |
pip install safety
- name: Run safety checks
run: |
safety --disable-optional-telemetry check --output=screen --file=poetry.lock --cache
env:
COLUMNS: 120
FORCE_COLOR: 1
NON_INTERACTIVE: 1