File: test_official.yml

package info (click to toggle)
python-telegram-bot 22.5-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 11,940 kB
  • sloc: python: 92,703; makefile: 179; sh: 4
file content (50 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Bot API Tests
on:
  pull_request:
    paths:
      - src/telegram/**
      - tests/**
  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'

permissions: {}

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          persist-credentials: false
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          python -W ignore -m pip install --upgrade pip
          python -W ignore -m pip install .[all] --group tests
      - name: Compare to official api
        run: |
          pytest -v tests/test_official/test_official.py --junit-xml=.test_report_official.xml
          exit $?
        env:
          TEST_OFFICIAL: "true"
        shell: bash --noprofile --norc {0}

      - name: Test Summary
        id: test_summary
        uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
        if: always()  # always run, even if tests fail
        with:
          paths: .test_report_official.xml