Skip to content

96 model evaluation #81

96 model evaluation

96 model evaluation #81

Workflow file for this run

name: Python CI/CD
on:
pull_request:
branches: [master]
release:
types: [published]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.base_ref == 'master'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Cache uv environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Sync dependencies
run: uv sync
- name: Create .env file for testing
run: |
echo "API_KEY=${{ secrets.ARTIFEX_API_KEY }}" > .env
- name: Run Unit Tests
run: uv run pytest tests/unit -x -v --tb=short
- name: Run Integration Tests
run: uv run pytest tests/integration -x -v --tb=short
publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
contents: read
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build the package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: python -m twine upload dist/*