Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9562c6a

Browse files
committedMay 18, 2024·
add github actions
1 parent 4a73be4 commit 9562c6a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
 

‎.github/workflows/run_uts_on_prs.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: UT Sanity Check on PRs
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
jobs:
10+
run_uts:
11+
name: Run UTs
12+
runs-on: ubuntu-20.04
13+
timeout-minutes: 30
14+
if: ${{ github.event_name == 'workflow_dispatch' || (!github.event.pull_request.draft && (github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'integration'))}}
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
python-version: [2.7.18, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements-tests.txt
32+
- name: Test with pytest
33+
run: |
34+
pytest tests --durations=5 --durations-min=180.0 --timeout=120 -W ignore::DeprecationWarning

0 commit comments

Comments
 (0)
Please sign in to comment.