Skip to content

Commit b168046

Browse files
authored
Merge pull request #271 from chekos/update-actions-hotfix
move safety checks to their own action
2 parents 935a643 + 1263ac6 commit b168046

4 files changed

Lines changed: 70 additions & 36 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
poetry config virtualenvs.in-project true
3131
poetry install
3232
33-
- name: Run safety checks
34-
run: |
35-
make check-safety
36-
3733
- name: Run style checks
3834
run: |
3935
make check-codestyle

.github/workflows/safety.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: safety
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10"]
11+
12+
steps:
13+
- uses: actions/checkout@v3.5.0
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4.5.0
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
19+
- name: Install poetry
20+
run: make poetry-download
21+
22+
- name: Set up cache
23+
uses: actions/cache@v3.3.1
24+
with:
25+
path: .venv
26+
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
27+
28+
- name: Install dependencies
29+
run: |
30+
poetry config virtualenvs.in-project true
31+
poetry install
32+
33+
- name: Run safety checks
34+
run: |
35+
make check-safety

poetry.lock

Lines changed: 34 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pytest-cov = "^4.0.0"
4141

4242
[tool.poetry.dev-dependencies]
4343
darglint = "^1.8.0"
44-
isort = "^5.12.0"
44+
isort = {extras = ["colors"], version = "^5.12.0"}
4545
pyupgrade = "^3.3.1"
4646
black = "^23.3.0"
4747
mypy = "^1.1.1"

0 commit comments

Comments
 (0)