From 79e0f6b6dc2838bfc4a86b4882237e6f887b3540 Mon Sep 17 00:00:00 2001 From: Robin VAN DE MERGHEL Date: Tue, 29 Jul 2025 11:15:38 +0200 Subject: [PATCH] fix: Changed test to use conda instead of an old docker container --- .github/workflows/basic.yml | 85 +++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index d42df061..217d6d01 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -10,10 +10,10 @@ jobs: timeout-minutes: 10 steps: - - uses: actions/checkout@v3 - - name: Run shellcheck - run: | - find tests/CI -name '*.sh' -print0 | xargs -0 -n1 shellcheck --external-sources; + - 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 @@ -27,23 +27,26 @@ jobs: - 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'] }} - + - uses: actions/checkout@v3 + - name: Set up Conda with Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python }} + activate-environment: base + - name: Installing dependencies + run: conda install -y 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 @@ -57,17 +60,21 @@ jobs: - 3.6.15 - 3.9.17 - container: python:${{ matrix.python }}-slim steps: - - uses: actions/checkout@v3 - - name: Installing dependencies - run: | - python -m pip install pytest mock - apt-get update - apt install -y voms-clients - - name: Run pytest - run: pytest - + - uses: actions/checkout@v3 + - name: Set up Conda with Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python }} + activate-environment: base + - name: Installing dependencies + run: | + conda install -y pytest mock + sudo apt-get update + sudo apt-get install -y voms-clients + - name: Run pytest + run: pytest pylint: runs-on: ubuntu-24.04 @@ -81,11 +88,15 @@ jobs: - 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/ + - uses: actions/checkout@v3 + - name: Set up Conda with Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python }} + activate-environment: base + - name: Installing dependencies + run: conda install -y pylint + - name: Run pylint + run: pylint -E Pilot/ \ No newline at end of file