restore old code for execute_command (#33) #36
This file contains 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
name: Master build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
PACKAGE: luxos | |
GITHUB_DUMP: ${{ toJson(github) }} | |
XPY: "3.12" | |
XOS: "ubuntu-latest" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up runner | |
run: echo noop | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.push.ref }} | |
- name: Setup Python toolchain | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Python dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r tests/requirements.txt | |
- name: Run Python checks (ruff) | |
shell: bash | |
env: | |
PYTHONPATH: src | |
run: | | |
ruff check src tests | |
- name: Run Python checks (mypy) | |
shell: bash | |
env: | |
PYTHONPATH: src | |
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}} | |
run: | | |
mypy src \ | |
--no-incremental --xslt-html-report $OUTDIR/mypy | |
- name: Run Python checks | |
shell: bash | |
env: | |
PYTHONPATH: src | |
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}} | |
run: | | |
py.test \ | |
--cov=${{ env.PACKAGE }} \ | |
--cov-report=html:$OUTDIR/coverage --cov-report=xml:$OUTDIR/coverage.xml \ | |
--junitxml=$OUTDIR/junit/junit.xml --html=$OUTDIR/junit/junit.html --self-contained-html \ | |
tests | |
- name: Dump env | |
shell: bash | |
run: | | |
echo "github env:" | |
echo "$GITHUB_DUMP" | |
- name: Build wheel packages | |
if: ${{ ! contains(matrix.os, 'windows') }} | |
run: | | |
python make.pyz beta-build -v | |
touch .keepme | |
- name: "Publish beta package to pypi" | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ (matrix.python-version == env.XPY) && (matrix.os == env.XOS) }} | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qa-results-${{ matrix.python-version }}-${{ matrix.os }} | |
path: | | |
build/qa-${{ matrix.python-version }}-${{ matrix.os}} | |
dist | |
.keepme | |
# Use always() to always run this step to publish test results when there are test failures | |
if: always() |