Bump clamav/clamav-debian in /hack in the docker-compose-dev group #2381
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: "Test" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - "qa/**" | |
| - "stable/**" | |
| jobs: | |
| cache-pyenv-builder: | |
| name: "Cache layers of the pyenv-builder stage" | |
| runs-on: "ubuntu-24.04" | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| ubuntu-version: ["24.04"] | |
| steps: | |
| - name: "Check out repository" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| - name: "Set up Docker Buildx" | |
| uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 | |
| with: | |
| driver-opts: | | |
| network=host | |
| - name: "Generate cache key from requirements" | |
| id: cache_key | |
| run: | | |
| echo "requirements_hash=${{ hashFiles('requirements*.txt', 'requirements*.in', 'pyproject.toml') }}" >> $GITHUB_OUTPUT | |
| - name: "Build base layers" | |
| uses: "docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83" # v6.18.0 | |
| with: | |
| context: . | |
| file: ./hack/Dockerfile | |
| target: pyenv-builder | |
| build-args: | | |
| UBUNTU_VERSION=${{ matrix.ubuntu-version }} | |
| PYTHON_VERSION=${{ matrix.python-version }} | |
| BUILDKIT_INLINE_CACHE=1 | |
| push: false | |
| cache-from: | | |
| type=gha,scope=archivematica-tests-base-${{ matrix.ubuntu-version }}-${{ matrix.python-version }} | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ steps.cache_key.outputs.requirements_hash }} | |
| cache-to: | | |
| type=gha,scope=archivematica-tests-base-${{ matrix.ubuntu-version }}-${{ matrix.python-version }},mode=max | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ steps.cache_key.outputs.requirements_hash }},mode=max | |
| test: | |
| needs: [cache-pyenv-builder] | |
| name: "Test ${{ matrix.rule }} on ${{ matrix.python-version }}" | |
| runs-on: "ubuntu-24.04" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rule: [ | |
| "archivematica", | |
| ] | |
| ubuntu-version: [ | |
| "24.04", | |
| ] | |
| python-version: [ | |
| "3.9", | |
| "3.10", | |
| "3.11", | |
| "3.12" | |
| ] | |
| include: | |
| - rule: "storage-service" | |
| ubuntu-version: "24.04" | |
| python-version: "3.9" | |
| - rule: "migrations" | |
| ubuntu-version: "24.04" | |
| python-version: "3.9" | |
| steps: | |
| - name: "Check out repository" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| - name: "Check out the archivematica-storage-service submodule" | |
| run: | | |
| git submodule update --init hack/submodules/archivematica-storage-service/ | |
| - name: "Save user id" | |
| id: user_id | |
| run: | | |
| echo "user_id=$(id -u)" >> $GITHUB_OUTPUT | |
| - name: "Save group id" | |
| id: group_id | |
| run: | | |
| echo "group_id=$(id -g)" >> $GITHUB_OUTPUT | |
| - name: "Generate cache key from requirements" | |
| id: cache_key | |
| run: | | |
| echo "requirements_hash=${{ hashFiles('requirements*.txt', 'requirements*.in', 'pyproject.toml') }}" >> $GITHUB_OUTPUT | |
| - name: "Set up buildx" | |
| uses: "docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435" # v3.11.1 | |
| with: | |
| driver-opts: | | |
| network=host | |
| - name: "Build archivematica-tests image" | |
| uses: "docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83" # v6.18.0 | |
| with: | |
| context: . | |
| file: ./hack/Dockerfile | |
| target: archivematica-tests | |
| build-args: | | |
| USER_ID=${{ steps.user_id.outputs.user_id }} | |
| GROUP_ID=${{ steps.group_id.outputs.group_id }} | |
| UBUNTU_VERSION=${{ matrix.ubuntu-version }} | |
| PYTHON_VERSION=${{ matrix.python-version }} | |
| BUILDKIT_INLINE_CACHE=1 | |
| tags: archivematica-tests:latest | |
| push: false | |
| load: true | |
| cache-from: | | |
| type=gha,scope=archivematica-tests-base-${{ matrix.ubuntu-version }}-${{ matrix.python-version }} | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ matrix.rule }} | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ steps.cache_key.outputs.requirements_hash }} | |
| cache-to: | | |
| type=gha,scope=archivematica-tests-base-${{ matrix.ubuntu-version }}-${{ matrix.python-version }},mode=max | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ matrix.rule }},mode=max | |
| type=gha,scope=archivematica-tests-${{ matrix.ubuntu-version }}-${{ matrix.python-version }}-${{ steps.cache_key.outputs.requirements_hash }},mode=max | |
| - name: "Create external volumes" | |
| run: | | |
| make -C hack/ create-volumes | |
| - name: "Restore .tox cache" | |
| uses: "actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830" # v4.3.0 | |
| with: | |
| path: ./.tox | |
| key: tox-${{ matrix.python-version }}-${{ steps.cache_key.outputs.requirements_hash }} | |
| restore-keys: | | |
| tox-${{ matrix.python-version }}- | |
| - name: "Run make rule" | |
| run: | | |
| docker buildx install | |
| make -C hack/ test-${{ matrix.rule }} | |
| env: | |
| TOXARGS: -vv | |
| PYTEST_ADDOPTS: -vv --cov --cov-config=/src/pyproject.toml --cov-report xml:/src/coverage.xml | |
| PYTHON_VERSION: ${{ matrix.python-version }} | |
| - name: "Upload coverage report" | |
| if: matrix.rule != 'storage-service' && matrix.rule != 'migrations' && github.repository == 'artefactual/archivematica' | |
| uses: "codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7" # v5.5.1 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| name: ${{ matrix.rule }} | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| frontend: | |
| name: "Test frontend" | |
| runs-on: "ubuntu-24.04" | |
| defaults: | |
| run: | |
| working-directory: "./src/archivematica/dashboard/frontend/" | |
| steps: | |
| - name: "Check out repository" | |
| if: "${{ github.event_name != 'workflow_dispatch' }}" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| - name: "Check out repository (manually triggered)" | |
| if: "${{ github.event_name == 'workflow_dispatch' }}" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| with: | |
| ref: "${{ inputs.am_version || 'qa/1.x' }}" | |
| - name: "Set up Node JS" | |
| uses: "actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903" # v6.0.0 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: | | |
| **/package-lock.json | |
| - name: "Install frontend dependencies" | |
| run: | | |
| npm ci | |
| - name: "Run tests" | |
| run: | | |
| npm run "test-single-run" | |
| linting: | |
| name: "Lint" | |
| runs-on: "ubuntu-24.04" | |
| steps: | |
| - name: "Check out repository" | |
| if: "${{ github.event_name != 'workflow_dispatch' }}" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| - name: "Check out repository (manually triggered)" | |
| if: "${{ github.event_name == 'workflow_dispatch' }}" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| with: | |
| ref: "${{ inputs.am_version || 'qa/1.x' }}" | |
| - name: "Set up Python 3.9" | |
| uses: "actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c" # v6.0.0 | |
| with: | |
| python-version: "3.9" | |
| cache: "pip" | |
| cache-dependency-path: | | |
| requirements-dev.txt | |
| - name: "Install tox" | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install tox | |
| - name: "Run tox" | |
| run: | | |
| tox -e linting |