Skip to content

Commit 5bccd23

Browse files
authored
test: added a py3.9 pylint+pytest
1 parent 9a59b0f commit 5bccd23

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/basic.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,45 @@ jobs:
9090
env:
9191
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}
9292

93+
check-py39:
94+
runs-on: ubuntu-latest
95+
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
96+
timeout-minutes: 30
97+
defaults:
98+
# Activate the conda environment automatically in each step
99+
run:
100+
shell: bash -l {0}
101+
102+
strategy:
103+
fail-fast: False
104+
matrix:
105+
command:
106+
# TODO These three tests fail on Python 3:
107+
# * `test_BaseType_Unicode` and `test_nestedStructure` fail due to
108+
# DISET's string and unicode types being poorly defined
109+
- pytest --runslow -k 'not test_BaseType_Unicode and not test_nestedStructure'
110+
- pylint -j 0 -E src/
111+
112+
steps:
113+
- uses: actions/checkout@v3
114+
- name: Fail-fast for outdated pipelines
115+
run: .github/workflows/fail-fast.sh
116+
- name: fix python3.9
117+
run: |
118+
sed "s/python =3.11/python =3.9/g" environment.yml
119+
- uses: conda-incubator/setup-miniconda@master
120+
with:
121+
environment-file: environment.yml
122+
miniforge-variant: Mambaforge
123+
use-mamba: true
124+
- name: Run tests
125+
run: |
126+
# FIXME: The unit tests currently only work with editable installs
127+
pip install -e .[server,testing]
128+
${{ matrix.command }}
129+
env:
130+
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}
131+
93132
pylint-py27:
94133
name: Pylint for Python 2.7 in Pilot files
95134
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)