Files
renovate[bot] 10c1b1a5cc chore(deps): update astral-sh/setup-uv action to v10.3.3 (#358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 15:22:16 -04:00

106 lines
2.9 KiB
YAML

---
name: CI Tests
permissions: {}
env:
PYTHON_VERSION: '3.14'
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: latest
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: true
- name: Install Python dependencies
run: |
uv sync \
--locked \
--extra dev \
--python "${PYTHON_VERSION}" \
--no-build \
--no-install-project \
--no-python-downloads
- name: Install npm dependencies
run: npm ci --ignore-scripts
- name: Test with pytest
id: pytest
shell: bash
run: uv run --no-build --no-sync python -m pytest tests
- name: Test with Jest
id: jest
if: always()
env:
FORCE_COLOR: true
shell: bash
run: npm test
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(
steps.pytest.outcome == 'success' ||
steps.pytest.outcome == 'failure' ||
steps.jest.outcome == 'success' ||
steps.jest.outcome == 'failure'
) &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
fail_ci_if_error: true
files: ./coverage/python-coverage.xml,./coverage/coverage-final.json
report_type: coverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Upload test results
# any except canceled or skipped
if: >-
always() &&
(
steps.pytest.outcome == 'success' ||
steps.pytest.outcome == 'failure' ||
steps.jest.outcome == 'success' ||
steps.jest.outcome == 'failure'
) &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
fail_ci_if_error: true
files: ./junit-python.xml,./junit.xml
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true