Add python packaging and tests

This commit is contained in:
Caelan Sayler
2025-06-15 09:52:10 +01:00
committed by Caelan
parent 95b6130f8d
commit 6007e4d7c3
2 changed files with 43 additions and 3 deletions

View File

@@ -3,7 +3,22 @@ on:
workflow_call:
jobs:
package:
python:
runs-on: ubuntu-latest
steps:
- name: Download Python Artifacts
uses: actions/download-artifact@v4
with:
path: pythondl
pattern: wheels-*
merge-multiple: true
- name: Upload lib-python package
uses: actions/upload-artifact@v4
with:
name: lib-python
path: pythondl
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@@ -56,6 +56,29 @@ jobs:
npm run build
npm run test
python:
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest, ubuntu-latest, macos-latest]
# runs-on: ${{ matrix.os }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Job Environment
uses: ./.github/actions/job-setup
- name: Install Dependencies
working-directory: src/lib-python
run: |
dotnet tool update -g vpk
pip install uv
uv sync
- name: Check lib-python
working-directory: src/lib-python/test
run: uv run python run_test.py
vpk:
strategy:
fail-fast: false
@@ -88,7 +111,8 @@ jobs:
run: dotnet tool install -g dotnet-coverage
- name: Build .NET
run: dotnet build -c Release
- uses: ./.github/actions/wait-artifact
- name: Wait for Artifacts
uses: ./.github/actions/wait-artifact
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_wait_seconds: 900
@@ -123,7 +147,8 @@ jobs:
uses: codecov/codecov-action@v5
with:
directory: ./test
- uses: ./.github/actions/wait-artifact
- name: Wait for Artifacts
uses: ./.github/actions/wait-artifact
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}