2023-10-02 19:51:34 +02:00
|
|
|
name: Bot API Tests
|
|
|
|
on:
|
|
|
|
pull_request:
|
2024-03-02 10:56:15 +01:00
|
|
|
paths:
|
|
|
|
- telegram/**
|
|
|
|
- tests/**
|
2023-10-02 19:51:34 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
schedule:
|
|
|
|
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions
|
|
|
|
- cron: '7 3 * * 1,5'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-conformity:
|
|
|
|
name: check-conformity
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [3.11]
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
fail-fast: False
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-01-03 16:43:35 +01:00
|
|
|
uses: actions/setup-python@v5
|
2023-10-02 19:51:34 +02:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -W ignore -m pip install --upgrade pip
|
2024-06-15 10:29:19 +02:00
|
|
|
python -W ignore -m pip install .[all]
|
|
|
|
python -W ignore -m pip install -r requirements-unit-tests.txt
|
2023-10-02 19:51:34 +02:00
|
|
|
- name: Compare to official api
|
|
|
|
run: |
|
2024-02-09 18:12:13 +01:00
|
|
|
pytest -v tests/test_official/test_official.py --junit-xml=.test_report_official.xml
|
2023-10-02 19:51:34 +02:00
|
|
|
exit $?
|
|
|
|
env:
|
|
|
|
TEST_OFFICIAL: "true"
|
|
|
|
shell: bash --noprofile --norc {0}
|
|
|
|
|
|
|
|
- name: Test Summary
|
|
|
|
id: test_summary
|
2024-08-03 17:27:39 +02:00
|
|
|
uses: test-summary/action@v2.4
|
2023-10-02 19:51:34 +02:00
|
|
|
if: always() # always run, even if tests fail
|
|
|
|
with:
|
|
|
|
paths: .test_report_official.xml
|