|
10 | 10 | - uses: actions/checkout@v3
|
11 | 11 | - uses: actions/setup-python@v2
|
12 | 12 | with:
|
13 |
| - python-version: '3.9' |
| 13 | + python-version: '3.11' |
14 | 14 | - name: Install pre-commit
|
15 | 15 | run: pip install pre-commit
|
16 | 16 | - name: Run pre-commit
|
|
40 | 40 | - uses: actions/checkout@v3
|
41 | 41 | - uses: actions/setup-python@v2
|
42 | 42 | with:
|
43 |
| - python-version: '3.9' |
| 43 | + python-version: '3.11' |
44 | 44 | - name: Installing dependencies
|
45 | 45 | run: |
|
46 | 46 | python -m pip install pycodestyle
|
|
90 | 90 | env:
|
91 | 91 | REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}
|
92 | 92 |
|
| 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 -i "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 | + |
93 | 132 | pylint-py27:
|
94 | 133 | name: Pylint for Python 2.7 in Pilot files
|
95 | 134 | runs-on: ubuntu-latest
|
|
0 commit comments