From 7a4168f8efd2bf4a46adbc090cb0540a94c02d99 Mon Sep 17 00:00:00 2001 From: "soleng-terraform[bot]" <168111096+soleng-terraform[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:36:23 +0930 Subject: [PATCH] update .github/workflows/check.yaml (#33) Co-authored-by: soleng-terraform[bot] <168111096+soleng-terraform[bot]@users.noreply.github.com> --- .github/workflows/check.yaml | 55 ++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 617a875..b2bbc95 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -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