From da08eca4ab8b9105f9276f596c824702a3cc0622 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 30 Jun 2026 16:25:32 -0400 Subject: [PATCH] [ci] Fix split in files --- .gitea/workflows/build.yml | 68 ------------------------- .gitea/workflows/{deploy.yml => ci.yml} | 9 +++- PROJECT.org | 6 ++- 3 files changed, 13 insertions(+), 70 deletions(-) delete mode 100644 .gitea/workflows/build.yml rename .gitea/workflows/{deploy.yml => ci.yml} (97%) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index 7150a57..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: build - -on: - push: - branches: ["**"] - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - env: - VROBBLER_DATABASE_URL: sqlite:///test.db - VROBBLER_USDA_API_KEY: ${{ vars.VROBBLER_USDA_API_KEY }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Cache pip/poetry - uses: actions/cache@v4 - with: - path: | - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-py311-${{ hashFiles('**/poetry.lock') }} - restore-keys: | - ${{ runner.os }}-py311- - - - name: Install Poetry - run: | - python -m pip install --upgrade pip - pip install poetry - - - name: Install deps - run: | - cp vrobbler.conf.test vrobbler.conf - poetry install --with test - - - name: Pytest with coverage - run: | - poetry run pytest -n 5 --cov-report term:skip-covered --cov=vrobbler tests - - - name: Notify success (ntfy) - if: success() - run: | - curl -fsS \ - -H "Title: vrobbler CI success" \ - -H "Priority: low" \ - -H "Tags: success,vrobbler" \ - -H "Actions: view, Changes, ${{ gitea.server_url }}/${{ gitea.repository }}/commit/${{ gitea.sha }}; view, Build, ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}" \ - -d "✅ Build succeeded: ${{ gitea.repository }} @ ${{ gitea.sha }}" \ - https://ntfy.unbl.ink/drone - - - name: Notify failure (ntfy) - if: failure() - run: | - curl -fsS \ - -H "Title: vrobbler CI failure" \ - -H "Priority: high" \ - -H "Tags: failure,vrobbler" \ - -H "Actions: view, Changes, ${{ gitea.server_url }}/${{ gitea.repository }}/commit/${{ gitea.sha }}; view, Build, ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}" \ - -d "❌ Build failed: ${{ gitea.repository }} @ ${{ gitea.sha }}" \ - https://ntfy.unbl.ink/drone diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/ci.yml similarity index 97% rename from .gitea/workflows/deploy.yml rename to .gitea/workflows/ci.yml index b84edde..5817277 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/ci.yml @@ -1,8 +1,14 @@ -name: deploy +name: ci on: push: + branches: ["**"] tags: ["*"] + pull_request: + +concurrency: + group: ${{ gitea.workflow }} + cancel-in-progress: false jobs: test: @@ -68,6 +74,7 @@ jobs: build-and-deploy: needs: [test] + if: startsWith(gitea.ref, 'refs/tags/') runs-on: ubuntu-latest steps: diff --git a/PROJECT.org b/PROJECT.org index a0f07bd..ba10636 100644 --- a/PROJECT.org +++ b/PROJECT.org @@ -88,7 +88,7 @@ fetching and simple saving. *** Metadata sources **** Scraper -* Backlog [0/23] :vrobbler:project:personal: +* Backlog [1/24] :vrobbler:project:personal: ** TODO [#C] After transition to linux add curl_cffi as webpage scrapper again :webpages:metadata: ** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :bug:music:scrobbles: :PROPERTIES: @@ -605,6 +605,10 @@ independent of the email flow it was originally creatdd for ** TODO [#B] Is there way to create unique slugs for media instances :media_types: +** DONE [#A] Fix CI so we don't double run deploys and builds :ci: +:PROPERTIES: +:ID: 1a93e7cb-b883-aae5-2bd5-fcdd6e16f8ab +:END: * Version 58.6 [1/1] ** DONE [#B] Cleanup commands should check for broken images :metadata:cleanup: :PROPERTIES: