Skip to content

Commit 655f4be

Browse files
DEV: Add scheduled tests workflow for pytest slow option
1 parent 45971e9 commit 655f4be

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Scheduled Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 17 */14 * 5" # every 2 weeks, always on a Friday at 17:00
6+
timezone: "America/Sao_Paulo"
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
pytest:
14+
if: github.ref == "refs/heads/master" || github.ref == "refs/heads/develop"
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
fail-fast: false
19+
python-version: [3.9, 3.12]
20+
21+
env:
22+
OS: ${{ matrix.os }}
23+
PYTHON: ${{ matrix.python-version }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install rocketpy
32+
run: pip install .
33+
34+
- name: Test importing rocketpy
35+
run: python -c "import sys, rocketpy; print(f'{rocketpy.__name__} running on Python {sys.version}')"
36+
37+
- name: Install test dependencies
38+
run: |
39+
pip install -r requirements-tests.txt
40+
pip install .[all]
41+
42+
- name: Run Unit Tests
43+
run: pytest tests/unit --cov=rocketpy
44+
45+
- name: Run Documentation Tests
46+
run: pytest rocketpy --doctest-modules --cov=rocketpy --cov-append
47+
48+
- name: Run Integration Tests
49+
run: pytest tests/integration --cov=rocketpy --cov-append
50+
51+
- name: Run Acceptance Tests
52+
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml
53+
54+
- name: Run slow tests
55+
run: pytest tests -vv -m slow --runslow --cov=rocketpy --cov-append --cov-report=xml

0 commit comments

Comments
 (0)