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 8c8e66c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
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
17 changes: 14 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ on:

jobs:
test:
name: 📊 PyTest
name: 🔬 Linting, 📊 PyTest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Install poetry
run: pipx install poetry
- name: Install poetry, isort, black
run: pipx install poetry, isort, black

- name: View poetry, isort, black versions
run: |
poetry --version
isort --version-number
black --version
- name: 🐍 Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
Expand All @@ -25,6 +31,11 @@ jobs:

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

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

0 comments on commit 8c8e66c

Please sign in to comment.