Skip to content

Commit

Permalink
test: added a py3.9 pylint+pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni authored Aug 2, 2023
1 parent 9a59b0f commit 5bccd23
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,45 @@ jobs:
env:
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}

check-py39:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
timeout-minutes: 30
defaults:
# Activate the conda environment automatically in each step
run:
shell: bash -l {0}

strategy:
fail-fast: False
matrix:
command:
# TODO These three tests fail on Python 3:
# * `test_BaseType_Unicode` and `test_nestedStructure` fail due to
# DISET's string and unicode types being poorly defined
- pytest --runslow -k 'not test_BaseType_Unicode and not test_nestedStructure'
- pylint -j 0 -E src/

steps:
- uses: actions/checkout@v3
- name: Fail-fast for outdated pipelines
run: .github/workflows/fail-fast.sh
- name: fix python3.9
run: |
sed "s/python =3.11/python =3.9/g" environment.yml
- uses: conda-incubator/setup-miniconda@master
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
use-mamba: true
- name: Run tests
run: |
# FIXME: The unit tests currently only work with editable installs
pip install -e .[server,testing]
${{ matrix.command }}
env:
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}

pylint-py27:
name: Pylint for Python 2.7 in Pilot files
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5bccd23

Please sign in to comment.