Skip to content

fixup! ci: test on more python versions #752

fixup! ci: test on more python versions

fixup! ci: test on more python versions #752

Workflow file for this run

name: test

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

(Line: 58, Col: 15): Unrecognized function: 'replace'. Located at position 87 within expression: startsWith(matrix.python-version, 'pypy') && matrix.python-version || format('py{0}', replace(matrix.python-version, '.', ''))
permissions:
contents: read
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
lint:
name: Lint datadogpy files on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['2.7', '3.14']
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install tox
# - name: Run black
# run: pre-commit run --all-files --hook-stage=manual black
- name: Run mypy
run: tox -e mypy
- name: Run flake8
run: tox -e flake8
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: ['pypy2.7', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.8']
# os: [ubuntu-latest, windows-latest, macos-latest]
# python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', 'pypy-2.7', 'pypy-3.8']
env:
TOXENV: ${{ startsWith(matrix.python-version, 'pypy') && matrix.python-version || format('py{0}', replace(matrix.python-version, '.', '')) }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: ${{ matrix.python-version }}
- name: Set constrains for python2.7
# Latest PyYaml supported version for python 2.7 is 5.4.1 which requires
# cython<3 to build. See: https://github.com/yaml/pyyaml/issues/724
if: ${{ matrix.python-version == 'pypy2.7' }}
run: |
echo "cython<3" > /tmp/constraints.txt
echo "PIP_CONSTRAINT=/tmp/constraints.txt" >> $GITHUB_ENV
- name: Install tox
run: pip install tox
- name: Run unit tests
run: tox
- name: Run integration tests on cassettes
run: tox -e integration -- --vcr-record=none
- name: Run admin integration tests on cassettes
run: tox -e integration-admin -- --vcr-record=none