Fix/gh 48 export relative paths #154
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: Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test-backend: | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.12" | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv and set the python version | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
cache-dependency-glob: "back/uv.lock" | |
pyproject-file: "back/pyproject.toml" | |
- name: Install the project dependencies | |
run: | | |
cd back | |
uv sync --all-extras --dev | |
- name: Run Linter | |
run: | | |
cd back | |
uv run ruff check src tests | |
- name: Check Formatting | |
run: | | |
cd back | |
uv run ruff format --check src tests | |
- name: Check types | |
run: | | |
cd back | |
uv run pyright src | |
- name: Run tests | |
run: | | |
cd back | |
uv run pytest --cov=src/whombat --cov-report=xml -n auto | |
- name: "Create cache key for documentation" | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: echo "$PWD/back/.venv/bin" >> $GITHUB_PATH | |
- name: Upload coverage reports to Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: codecov/codecov-action@v4 | |
env: | |
files: back/coverage.xml | |
fail_ci_if_error: true | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
test-frontend: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "npm" | |
cache-dependency-path: | | |
front/package-lock.json | |
- name: Install frontend dependencies | |
run: | | |
cd front | |
npm ci | |
- name: Check formatting | |
run: | | |
cd front | |
npm run format-check | |
- name: Lint with Nextjs | |
run: | | |
cd front | |
npm run lint | |
- name: Lint with Typescript Compiler | |
run: | | |
cd front | |
npm run lint-tsc | |
- name: Run tests | |
run: | | |
cd front | |
npm run test |