Add TypeScript tests to CI #658
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
steps: | |
- uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: hynek/setup-cached-uv@v1 | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: just install | |
- name: Run checks | |
run: just check | |
- name: Run tests | |
run: just test | |
ts-tests: | |
name: TypeScript Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
steps: | |
- uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.7" | |
- uses: hynek/setup-cached-uv@v1 | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: just install | |
- name: Compile tests | |
run: npm run pretest | |
- name: Run tests (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: xvfb-run npm run tests | |
- name: Run tests (Others) | |
if: "!startsWith(matrix.os, 'ubuntu')" | |
run: npm run tests |