Skip to content

fix(ci): use absolute paths for venv commands instead of source #5

fix(ci): use absolute paths for venv commands instead of source

fix(ci): use absolute paths for venv commands instead of source #5

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create venv and install
run: |
uv venv
.venv/bin/pip install -e ".[dev]"
- name: Run tests
run: |
.venv/bin/pytest --cov=metaspec --cov-report=xml --cov-report=term
- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
file: ./coverage.xml
fail_ci_if_error: false
lint:
name: Lint and Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create venv and install
run: |
uv venv
.venv/bin/pip install -e ".[dev]"
- name: Run ruff
run: |
.venv/bin/ruff check .
- name: Run mypy
run: |
.venv/bin/mypy src/metaspec
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create venv and install build tools
run: |
uv venv
.venv/bin/pip install build twine
- name: Build package
run: |
.venv/bin/python -m build
- name: Check package
run: |
.venv/bin/twine check dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/