mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-08 12:07:39 -06:00
Add pytest with GitHub Action workflow
This commit is contained in:
40
.github/workflows/test.yaml
vendored
Normal file
40
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Pytest
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up python
|
||||
id: setup-python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12.7"
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.8.4
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
- name: Load cached venv
|
||||
id: cached-pip-wheels
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache
|
||||
key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd backend && poetry install --no-interaction --no-root
|
||||
|
||||
- name: Install library
|
||||
run: cd backend && poetry install --no-interaction
|
||||
|
||||
- run: |
|
||||
source $VENV
|
||||
pytest --version
|
||||
Reference in New Issue
Block a user