Skip to content

Commit

Permalink
ci: added linting and workflow dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
borolepratik committed Jan 27, 2024
1 parent 2227082 commit 801af99
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and Publish Docker Images

on:
workflow_run:
workflows: [Run Tests, CodeQL]
types: [completed]
push:
branches: [main, staging, dev]
pull_request:
Expand All @@ -16,6 +19,8 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
# run only if workflow dependencies succeed
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: read
packages: write
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
test:
name: 📊 PyTest
name: 🔬 Linting, 📊 PyTest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
Expand All @@ -17,6 +17,9 @@ jobs:
- name: Install poetry
run: pipx install poetry

- name: View poetry version
run: poetry --version

- name: 🐍 Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
with:
Expand All @@ -25,6 +28,13 @@ jobs:

- name: Install dependencies
run: poetry install --no-root

- name: 🔬 Python Lint (isort/black)
run: |
isort --version-number
isort --check-only --quiet
black --version
black --check .
- name: 📊 Run tests
run: poetry run pytest -rpP

0 comments on commit 801af99

Please sign in to comment.