jailmaker/.github/workflows/build.yml

60 lines
1.3 KiB
YAML
Raw Normal View History

2024-07-15 01:12:51 +00:00
# Inspiration from <https://github.com/pypa/hatch/issues/669>
name: Build
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
workflow_dispatch:
jobs:
build:
name: Build jlmkr tool
runs-on: ubuntu-24.04
strategy:
matrix:
python-version:
- "3.11" # TrueNAS SCALE 24.04 Dragonfish
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install Hatch
uses: pypa/hatch@install
- name: Run style check
run: hatch fmt --check
2024-07-15 01:12:51 +00:00
# - name: Run unit tests
# run: hatch run +py=${{ matrix.python-version }} test:test
2024-07-15 01:12:51 +00:00
- name: Build distribution
run: hatch build -t zipapp -t appzip
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# path:
# - dist/jlmkr
# - dist/jlmkr-*.zip
# if-no-files-found: error