feat: invert condition checks and add granular integration validators #176
Workflow file for this run
This file contains hidden or 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
| # Copyright 2024 Canonical Ltd. | |
| # See LICENSE file for licensing details. | |
| name: hpc-libs tests | |
| on: | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| inclusive-naming-check: | |
| name: Inclusive naming check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run tests | |
| uses: get-woke/woke-action@v0 | |
| with: | |
| fail-on-error: true | |
| commitlint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install commitlint | |
| run: npm install -D @commitlint/cli @commitlint/config-conventional | |
| - name: Validate PR commits with commitlint | |
| run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Just | |
| uses: extractions/setup-just@v2 | |
| with: | |
| just-version: 1.39.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: 0.5.8 | |
| - name: Run linters | |
| run: just lint | |
| unit-test: | |
| name: Unit tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Just | |
| uses: extractions/setup-just@v2 | |
| with: | |
| just-version: 1.39.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: 0.5.8 | |
| - name: Run unit tests | |
| run: just unit | |
| typecheck: | |
| name: Static type checking | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Just | |
| uses: extractions/setup-just@v2 | |
| with: | |
| just-version: 1.39.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: 0.5.8 | |
| - name: Run tests | |
| run: just typecheck | |
| integration-test: | |
| name: Integration tests | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - inclusive-naming-check | |
| - lint | |
| - typecheck | |
| - unit-test | |
| - commitlint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Just | |
| uses: extractions/setup-just@v2 | |
| with: | |
| just-version: 1.39.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: 0.5.8 | |
| - name: Set up LXD | |
| uses: canonical/[email protected] | |
| with: | |
| channel: 5.21/stable | |
| - name: Set up gambol | |
| run: | | |
| sudo snap install gambol | |
| - name: Run tests | |
| run: just integration |