Merge pull request #277 from fstagni/redhat_release__not #893
This file contains hidden or 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: Basic tests | |
| on: [push, pull_request] | |
| jobs: | |
| shellcheck: | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC' | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Run shellcheck | |
| run: | | |
| find tests/CI -name '*.sh' -print0 | xargs -0 -n1 shellcheck --external-sources; | |
| pycodestyle: | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot' | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: | |
| - 3.6.15 | |
| - 3.9.17 | |
| container: python:${{ matrix.python }}-slim | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Installing dependencies | |
| run: | | |
| python -m pip install pycodestyle | |
| - name: Run pycodestyle | |
| run: | | |
| if [[ "${REFERENCE_BRANCH}" != "" ]]; then | |
| git remote add upstream https://github.com/DIRACGrid/Pilot.git | |
| git fetch --no-tags upstream "${REFERENCE_BRANCH}" | |
| git branch -vv | |
| git diff -U0 "upstream/${REFERENCE_BRANCH}" | pycodestyle --diff | |
| fi | |
| env: | |
| REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }} | |
| pytest: | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot' | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: | |
| - 3.6.15 | |
| - 3.9.17 | |
| container: python:${{ matrix.python }}-slim | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Installing dependencies | |
| run: | | |
| echo 'deb http://archive.debian.org/debian stretch main' > /etc/apt/sources.list | |
| echo 'deb http://archive.debian.org/debian-security stretch/updates main' >> /etc/apt/sources.list | |
| apt-get update || true | |
| python -m pip install pytest mock | |
| apt install -y voms-clients | |
| - name: Run pytest | |
| run: pytest | |
| pylint: | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name != 'push' || github.repository == 'DIRACGrid/Pilot' | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: | |
| - 3.6.15 | |
| - 3.9.17 | |
| container: python:${{ matrix.python }}-slim | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Installing dependencies | |
| run: | | |
| python -m pip install pylint | |
| - name: Run pylint | |
| run: pylint -E Pilot/ |