Skip to content

test

test #1914

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 5 * * *"
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
jobs:
test:
name: py ${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, "3.10", 3.11, 3.12]
node-version: [20]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v2
# ------------------------------------------------------------------------
# JS
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install JS deps
run: |
just js-install
- name: Build JS
run: |
just js-build
# ------------------------------------------------------------------------
# Python
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Print Python info
run: |
uv run which python
uv run python --version
uv run which pip
uv pip --version
uv pip freeze
- name: Run tests
run: |
uv run pytest .
just report
- name: Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml
- name: Upload test results to GitHub
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-py${{ matrix.python-version }}
path: htmlcov