Skip to content

Commit

Permalink
Merge pull request #271 from chekos/update-actions-hotfix
Browse files Browse the repository at this point in the history
move safety checks to their own action
  • Loading branch information
chekos authored Apr 6, 2023
2 parents 935a643 + 1263ac6 commit b168046
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 36 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
poetry config virtualenvs.in-project true
poetry install
- name: Run safety checks
run: |
make check-safety
- name: Run style checks
run: |
make check-codestyle
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/safety.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: safety

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: make poetry-download

- name: Set up cache
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run safety checks
run: |
make check-safety
65 changes: 34 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pytest-cov = "^4.0.0"

[tool.poetry.dev-dependencies]
darglint = "^1.8.0"
isort = "^5.12.0"
isort = {extras = ["colors"], version = "^5.12.0"}
pyupgrade = "^3.3.1"
black = "^23.3.0"
mypy = "^1.1.1"
Expand Down

0 comments on commit b168046

Please sign in to comment.