From 0812f4b9eeffdff5a8c3d0802aea94c8919d9922 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Fri, 7 Jun 2024 10:26:05 +0200 Subject: [PATCH] Devops: Add Dependabot config for maintaining GH actions (#6467) * Add dependabot config for maintaining GH actions * Enable `FORCE_COLOR` environment variable * Update `uv` installer * Remove code coverage in `presto` test suite * Do not install from `requirements.txt` for `verdi` --- .github/actions/install-aiida-core/action.yml | 2 +- .github/dependabot.yml | 11 +++++++++++ .github/workflows/ci-code.yml | 13 ++----------- .github/workflows/ci-style.yml | 3 +++ .github/workflows/docs-build.yml | 3 +++ .github/workflows/release.yml | 8 +++----- .readthedocs.yml | 4 ++-- 7 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/actions/install-aiida-core/action.yml b/.github/actions/install-aiida-core/action.yml index f51cf4d299..3c82771cdc 100644 --- a/.github/actions/install-aiida-core/action.yml +++ b/.github/actions/install-aiida-core/action.yml @@ -28,7 +28,7 @@ runs: - name: Install uv installer run: curl --proto '=https' --tlsv1.2 -LsSf https://${{ env.UV_URL }} | sh env: - UV_VERSION: 0.2.5 + UV_VERSION: 0.2.9 UV_URL: github.com/astral-sh/uv/releases/download/$UV_VERSION/uv-installer.sh shell: bash diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..8f0af41bb2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: +# Maintain dependencies for GitHub Actions +- package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + groups: + gha-dependencies: + patterns: + - '*' diff --git a/.github/workflows/ci-code.yml b/.github/workflows/ci-code.yml index bde141594b..60db44dcce 100644 --- a/.github/workflows/ci-code.yml +++ b/.github/workflows/ci-code.yml @@ -139,17 +139,7 @@ jobs: - name: Run test suite env: AIIDA_WARN_v3: 0 - run: pytest -m 'presto' --cov aiida - - - name: Upload coverage report - if: github.repository == 'aiidateam/aiida-core' - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: aiida-pytests-presto - flags: presto - file: ./coverage.xml - fail_ci_if_error: false # don't fail job, if coverage upload fails + run: pytest -m 'presto' verdi: @@ -165,6 +155,7 @@ jobs: uses: ./.github/actions/install-aiida-core with: python-version: '3.12' + from-requirements: 'false' - name: Run verdi tests run: | diff --git a/.github/workflows/ci-style.yml b/.github/workflows/ci-style.yml index 83a0e2bd87..1f4b549ad2 100644 --- a/.github/workflows/ci-style.yml +++ b/.github/workflows/ci-style.yml @@ -6,6 +6,9 @@ on: pull_request: branches-ignore: [gh-pages] +env: + FORCE_COLOR: 1 + jobs: pre-commit: diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 012a83d3b9..bf1cce6d4c 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -7,6 +7,9 @@ on: branches-ignore: [gh-pages] paths: [docs/**] +env: + FORCE_COLOR: 1 + jobs: docs-linkcheck: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6b27c979..4a3f0e8a19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,9 @@ on: tags: - v[0-9]+.[0-9]+.[0-9]+* +env: + FORCE_COLOR: 1 + jobs: check-release-tag: @@ -33,11 +36,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install system dependencies - # note libkrb5-dev is required as a dependency for the gssapi pip install - run: | - sudo apt update - sudo apt install libkrb5-dev ruby ruby-dev - name: Install aiida-core and pre-commit uses: ./.github/actions/install-aiida-core diff --git a/.readthedocs.yml b/.readthedocs.yml index 3ceaf73344..8f1e3118d0 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -17,8 +17,8 @@ build: # https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv post_create_environment: - asdf plugin add uv - - asdf install uv 0.1.44 - - asdf global uv 0.1.44 + - asdf install uv 0.2.9 + - asdf global uv 0.2.9 post_install: - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs,tests,rest,atomic_tools]