feat: fixing async issue now with tests #823
This file contains hidden or 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Tests | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
release: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv | |
EDUZEN_ID: 1234 | |
TOKEN: blah | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Setup libsqlite3 | |
run: | | |
sudo apt-get install libsqlite3-dev | |
- name: Install uv | |
uses: astral-sh/setup-uv@v7 | |
with: | |
enable-cache: true | |
- name: "Set up Python" | |
uses: actions/setup-python@v6 | |
- name: Restore uv cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.UV_CACHE_DIR }} | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Check Code Style | |
uses: pre-commit/action@v3.0.1 | |
- name: Test | |
run: | | |
uv run coverage run -m pytest | |
uv run coverage combine | |
uv run coverage report -m --skip-covered | |
uv run coverage json | |
- name: "Upload coverage data" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage.json | |
path: coverage.json | |
- name: Minimize uv cache | |
run: uv cache prune --ci |