Skip to content

Commit

Permalink
Merge pull request #36 from JohnStrunk/tests
Browse files Browse the repository at this point in the history
Add pylint tests to the CI workflow
  • Loading branch information
mergify[bot] authored Apr 30, 2024
2 parents b7ebaee + f1c31f6 commit 8322da9
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,36 @@ jobs:
- name: Run pre-commit gc
run: pipx run pre-commit gc

tests:
name: "Tests"
runs-on: ubuntu-latest

steps:
- name: Checkout repository
# https://github.com/actions/checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Set up Python
# https://github.com/actions/setup-python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
id: setup-py
with:
cache: 'pipenv'
python-version: "3.12"

- name: Install pipenv
run: pipx install pipenv

- name: Install dependencies
run: pipenv install --dev

- name: Run tests
run: pipenv run pytest -v


container:
name: "Build (and push) container image"
needs: [pre-commit]
needs: [pre-commit, tests]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -111,6 +138,8 @@ jobs:
# Effect on build times (B&P step only):
# No caching: 44s
# Max mode, no cache: 79s
# Max mode, changed deps: 61s
# Max mode, changed code:
# Max mode, perfect hit: 8s
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -121,7 +150,7 @@ jobs:
# - for branch protection rules
ci-success:
name: CI Workflow - Success
needs: [pre-commit, container]
needs: [container, pre-commit, tests]
runs-on: ubuntu-latest
steps:
- name: Success
Expand Down

0 comments on commit 8322da9

Please sign in to comment.