Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pylint tests to the CI workflow #36

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading