Skip to content

Commit

Permalink
See what GitHub Actions thinks of build-and-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonct committed Jul 18, 2024
1 parent 65dd6e9 commit 48acc57
Showing 1 changed file with 46 additions and 4 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
Expand All @@ -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: <https://github.com/pypa/hatch/issues/669>

- 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
Expand Down

0 comments on commit 48acc57

Please sign in to comment.