Files
serena/.github/workflows/pytest.yml
T

43 lines
1.3 KiB
YAML

name: Tests on Ubuntu
on: [push, pull_request]
jobs:
cpu:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
# Add Go bin directory to PATH for this workflow
# GITHUB_PATH is a special file that GitHub Actions uses to modify PATH
# Writing to this file adds the directory to the PATH for subsequent steps
- name: Install gopls
run: |
go install golang.org/x/tools/gopls@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Create virtual environment
run: uv venv
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Test with pytest
run: uv run poe test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false