CP-49934: Remove python 2.7 test in /.github/workflows/other.yml #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test (other) | |
on: | |
push: | |
pull_request: | |
schedule: | |
# run daily, this refreshes the cache | |
- cron: "13 2 * * *" | |
concurrency: # On new push, cancel old workflows from the same PR, branch or tag: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
python-test: | |
name: Python tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.11"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # To check which files changed: origin/master..HEAD | |
- uses: LizardByte/setup-python-action@master | |
with: | |
python-version: ${{matrix.python-version}} | |
- uses: actions/cache@v4 | |
name: Setup cache for running pre-commit fast | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- run: echo "::add-matcher::.github/workflows/python-warning-matcher.json" | |
name: "Setup GitHub for reporting Python warnings as annotations in pull request code review" | |
- uses: pre-commit/action@v3.0.1 | |
name: Run pre-commit checks (no spaces at end of lines, etc) | |
if: ${{ matrix.python-version != '2.7' }} | |
with: | |
extra_args: --all-files --verbose --hook-stage commit | |
env: | |
SKIP: no-commit-to-branch | |
- name: Upload Python ${{matrix.python-version}} coverage report to Codecov | |
if: ${{ matrix.python-version != '2.7' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: .git | |
files: coverage${{matrix.python-version}}.xml | |
env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
flags: python${{matrix.python-version}} | |
name: coverage${{matrix.python-version}} | |
verbose: true | |
- uses: dciborow/action-pylint@0.1.0 | |
if: ${{ matrix.python-version != '2.7' }} | |
with: | |
reporter: github-pr-review | |
level: warning | |
# To be customized to cover remaining Python scripts: | |
glob_pattern: "**/*.py" | |
continue-on-error: true | |
- name: Run pytype checks | |
if: ${{ matrix.python-version != '2.7' }} | |
run: pip install pandas pytype toml && ./pytype_reporter.py | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PYTYPE_REPORTER_DEBUG: True | |
- name: pyflakes | |
uses: reviewdog/action-pyflakes@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
continue-on-error: true | |
deprecation-test: | |
name: Deprecation tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Generate empty configuration for make to be happy | |
run: touch config.mk | |
- name: quality-gate | |
run: make quality-gate | |
test-sdk-builds: | |
name: Test SDK builds | |
uses: ./.github/workflows/generate-and-build-sdks.yml | |
with: | |
# Ensure you also update ocaml-tests | |
# when changing this value, to keep builds | |
# consistent | |
xapi_version: "v0.0.0" |