Skip to content

Commit

Permalink
Inline lint and unit workflows (#76)
Browse files Browse the repository at this point in the history
This reduces overall complexity,
makes it easier to debug workflows,
and removes dependency on bootstack-actions.
  • Loading branch information
samuelallan72 authored Sep 13, 2024
1 parent e3dae72 commit c82b520
Showing 1 changed file with 50 additions and 5 deletions.
55 changes: 50 additions & 5 deletions terraform-plans/templates/github/charm_check.yaml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,62 @@ concurrency:
cancel-in-progress: true

jobs:
lint-unit:
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2
lint:
name: Lint
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
with:
python-version: $${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python $${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: $${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pin tox to the current major version to avoid
# workflows breaking all at once when a new major version is released.
python -m pip install 'tox<5'

- name: Run linters
run: tox -e lint

unit:
name: Unit
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python $${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: $${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<5'

- name: Run unit tests
run: tox -e unit

func:
needs: lint-unit
needs:
- lint
- unit
name: functional tests
runs-on: $${{ matrix.runs-on }}
timeout-minutes: 120
Expand Down

0 comments on commit c82b520

Please sign in to comment.