8000 Move Bot API Tests to Separate Workflow File (#3912) · guillemap/python-telegram-bot@8cb177c · GitHub
[go: up one dir, main page]

Skip to content

Commit 8cb177c

Browse files
Move Bot API Tests to Separate Workflow File (python-telegram-bot#3912)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
1 parent eaf802e commit 8cb177c

File tree

2 files changed

+47
-35
lines changed

2 files changed

+47
-35
lines changed

.github/workflows/test_official.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bot API Tests
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
schedule:
10+
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions
11+
- cron: '7 3 * * 1,5'
12+
13+
jobs:
14+
check-conformity:
15+
name: check-conformity
16+
runs-on: ${{matrix.os}}
17+
strategy:
18+
matrix:
19+
python-version: [3.11]
20+
os: [ubuntu-latest]
21+
fail-fast: False
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -W ignore -m pip install --upgrade pip
31+
python -W ignore -m pip install -r requirements.txt
32+
python -W ignore -m pip install -r requirements-opts.txt
33+
python -W ignore -m pip install -r requirements-dev.txt
34+
- name: Compare to official api
35+
run: |
36+
pytest -v tests/test_official.py --junit-xml=.test_report_official.xml
37+
exit $?
38+
env:
39+
TEST_OFFICIAL: "true"
40+
shell: bash --noprofile --norc {0}
41+
42+
- name: Test Summary
43+
id: test_summary
44+
uses: test-summary/action@v2.1
45+
if: always() # always run, even if tests fail
46+
with:
47+
paths: .test_report_official.xml

.github/workflows/test.yml renamed to .github/workflows/unit_tests.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -92,38 +92,3 @@ jobs:
9292
env_vars: OS,PYTHON
9393
name: ${{ matrix.os }}-${{ matrix.python-version }}
9494
fail_ci_if_error: true
95-
96-
test_official:
97-
name: test-official
98-
runs-on: ${{matrix.os}}
99-
strategy:
100-
matrix:
101-
python-version: [3.11]
102-
os: [ubuntu-latest]
103-
fail-fast: False
104-
steps:
105-
- uses: actions/checkout@v3
106-
- name: Set up Python ${{ matrix.python-version }}
107-
uses: actions/setup-python@v4
108-
with:
109-
python-version: ${{ matrix.python-version }}
110-
- name: Install dependencies
111-
run: |
112-
python -W ignore -m pip install --upgrade pip
113-
python -W ignore -m pip install -r requirements.txt
114-
python -W ignore -m pip install -r requirements-opts.txt
115-
python -W ignore -m pip install -r requirements-dev.txt
116-
- name: Compare to official api
117-
run: |
118-
pytest -v tests/test_official.py --junit-xml=.test_report_official.xml
119-
exit $?
120-
env:
121-
TEST_OFFICIAL: "true"
122-
shell: bash --noprofile --norc {0}
123-
124-
- name: Test Summary
125-
id: test_summary
126-
uses: test-summary/action@v2.1
127-
if: always() # always run, even if tests fail
128-
with:
129-
paths: .test_report_official.xml

0 commit comments

Comments
 (0)
0