diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77ec144..5ab578d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the workflow will run @@ -13,9 +11,53 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" + + ########################################################## + ## Build software for distribution; perform code-level QA + build: + name: Build jlmkr tool + runs-on: ubuntu-24.04 + strategy: + matrix: + python-version: + - "3.11" # TrueNAS SCALE 24.04 Dragonfish + steps: + # hat tip: + + - uses: actions/setup-python@v5 + with: + python-version-file: 'pyproject.toml' + cache: 'pip' + + - name: Install Hatch + run: pip install hatch + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build distribution + run: hatch build --ext + + - name: Run style check + run: hatch fmt --check + + - name: Run unit tests + run: hatch test --cover + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: + - dist/jlmkr + - dist/jlmkr-*.zip + if-no-files-found: error + + + ########################################################## + ## Perform rubber-meets-road integration testing test: # The type of runner that the job will run on runs-on: ubuntu-24.04