build: pyright config #58
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: deargen/workflows/actions/setup-python-and-uv@master | |
- name: Install dependencies | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -r deps/lock/x86_64-manylinux_2_28/requirements_dev.txt | |
bash scripts/install.sh | |
python3 scripts/hf_download.py | |
- name: Run pytest | |
uses: deargen/workflows/actions/run-pytest@master | |
cargo-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run cargo test | |
run: | | |
set +e # Do not exit shell on failure | |
cd rust | |
out=$(LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu cargo test 2> stderr.txt) | |
exit_code=$? | |
err=$(<stderr.txt) | |
# Display the raw output in the step | |
echo "${out}" | |
echo "${err}" | |
# Display the Markdown output in the job summary | |
{ echo "\`\`\`python"; echo "${out}"; echo "${err}"; echo "\`\`\`"; } >> "$GITHUB_STEP_SUMMARY" | |
# Exit with the exit-code returned by test | |
exit ${exit_code} |