File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Tests on PR
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+
11+ strategy :
12+ matrix :
13+ python-version : [3.9, 3.10]
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Set up Python ${{ matrix.python-version }}
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : ${{ matrix.python-version }}
22+
23+ - name : Cache pip dependencies
24+ uses : actions/cache@v3
25+ with :
26+ path : ~/.cache/pip
27+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28+ restore-keys : |
29+ ${{ runner.os }}-pip-
30+
31+ - name : Install dependencies
32+ run : |
33+ python -m pip install --upgrade pip
34+ pip install pytest
35+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
36+
37+ - name : Run tests with pytest
38+ run : |
39+ pytest --verbose --tb=short
You can’t perform that action at this time.
0 commit comments