From 6bad5a5baa4b2e09eb29dcfa56f4d12efad5f76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trevor=20Ba=C4=8Da?= Date: Fri, 24 Jan 2025 15:43:56 -0500 Subject: [PATCH] Clean up GitHub Actions dependency cache (#1630) Add .github/dependabot.yml --- .github/dependabot.yml | 7 +++++++ .github/workflows/main.yml | 25 +++++++++++-------------- ci/requirements.txt | 2 ++ 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..718572bf27 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 808b45b573..a1e37ede2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [ main ] - jobs: ci-tests: runs-on: ubuntu-latest @@ -20,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -54,22 +53,21 @@ jobs: - name: Install LilyPond run: | + set -e lilypond_archive="lilypond-${LILYPOND_VERSION}-linux-x86_64.tar.gz" base_url="https://gitlab.com/lilypond/lilypond/-/releases" lilypond_url="${base_url}/v${LILYPOND_VERSION}/downloads/${lilypond_archive}" echo "Downloading LilyPond from: ${lilypond_url}" - cd /tmp || { echo "Failed to change directory to /tmp"; exit 1; } + cd /tmp || { echo "Failed to change directory to /tmp"; } wget -q --tries=3 --timeout=30 ${lilypond_url} || \ - { echo "Download failed after 3 attempts"; exit 1; } + { echo "Download failed after 3 attempts"; } if [ ! -f "${lilypond_archive}" ]; then echo "File download failed!" >&2 - exit 1 fi checksum="3e837e811aaa72323863925f0a4b5bd1aff1ed9b997e6c70dbe5c008e47872e7" echo "${checksum} ${lilypond_archive}" > checksum.txt if ! sha256sum -c checksum.txt --status; then echo "Checksum verification failed!" >&2 - exit 1 fi rm checksum.txt echo "Checksum verified successfully." @@ -78,7 +76,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip coverage defusedxml + python -m pip install --upgrade pip python -m pip install -r ci/requirements.txt - name: Log dependencies @@ -94,15 +92,14 @@ jobs: run: | python -m pip install .[dev] python -c "import abjad; print(abjad.Configuration().configuration_file_path)" - scr/prime-parser-tables + python scr/prime-parser-tables - - name: Run checks (parallel) + - name: Run checks run: | - make black-check & - make flake8 & - make isort-check & - make mypy & - wait + make black-check + make flake8 + make isort-check + make mypy - name: Run tests run: | diff --git a/ci/requirements.txt b/ci/requirements.txt index 66528c93e6..2bb35771d5 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -1,3 +1,5 @@ +coverage +defusedxml black==24.10.0 flake8==7.1.1 isort==5.13.2