Create a venv in github action. #5
Workflow file for this run
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
name: Python Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install uv | |
run: | | |
curl -Ls https://astral.sh/uv/install.sh | bash | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: Create the virtual environnement using uv | |
run: uv venv | |
- name: Activate the venv and install dépendancies | |
run: | | |
source .venv/bin/activate | |
uv pip install -r <(uv pip compile pyproject.toml pyproject.toml#dev) | |
- name: Launch tests | |
run: | | |
source .venv/bin/activate | |
pytest |