fix: lock #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- feat/** | |
schedule: | |
- cron: "53 0 * * *" # Daily at 00:53 UTC | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
name: Run pre-commits | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tox & poetry | |
run: | | |
pipx install tox | |
pipx install poetry | |
- name: Set up python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: 'poetry' | |
- name: Install pre-commit | |
run: | | |
poetry install | |
poetry run pre-commit install | |
- name: Run pre-commit hooks | |
run: | | |
poetry run pre-commit run --all-files | |
lint: | |
name: Lint | |
uses: canonical/data-platform-workflows/.github/workflows/[email protected] | |
unit-test: | |
name: Unit test charm | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tox & poetry | |
run: | | |
pipx install tox | |
pipx install poetry | |
- name: Set up python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: 'poetry' | |
- name: Run tests | |
run: tox run -e unit |