-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.12 KB
/
pytest.yml
File metadata and controls
37 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
name: "Pytest Workflow"
on: # yamllint disable-line rule:truthy
# Makes it reusable; called by other workflows
workflow_call:
jobs:
test:
runs-on: "ubuntu-latest"
# Adding 'timeout-minutes: 10' would prevent jobs from running
# indefinitely if something goes wrong
timeout-minutes: 10
steps:
- name: "Checkout code"
uses: "actions/checkout@v6"
- name: "Set up Python 3.12"
uses: "actions/setup-python@v6"
with:
python-version: "3.12"
- name: "Cache PIP Dependencies"
uses: "actions/cache@v4"
with:
path: ~/.cache/pip
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: "Run pytest"
run: |
pytest . --verbose --ignore=solutions --log-cli-level=INFO