From d1365d2260c795dfdb2c28e529500d44f83f7af1 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Wed, 7 Aug 2024 15:26:53 +0000 Subject: [PATCH 1/7] ci: inherit pypi publish flow Co-authored-by: Helen Theissen --- .github/workflows/python-publish.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 666f65d..42766a2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -48,27 +48,6 @@ jobs: run: pytest deploy: - - if: ${{ github.event_name == 'release' }} - runs-on: ubuntu-latest needs: [checks, quality] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.x - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python -m build - twine upload dist/* + uses: ecmwf/reusable-workflow/.github/workflows/cd-pypi.yml@v2 + secrets: inherit From 74c8477e602240acadfe7bfa22a5616eb6bd1358 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Wed, 7 Aug 2024 15:29:27 +0000 Subject: [PATCH 2/7] docs: add to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661ed93..d379f6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Keep it human-readable, your future self will thank you! ### Added ### Changed + - Update CI to inherit from common infrastructue reusable workflows ### Removed From 04258d4f9b77d1250d28c5d872ec4e55d5bb5279 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Wed, 7 Aug 2024 15:36:54 +0000 Subject: [PATCH 3/7] fix: typo in reusable workflow --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 42766a2..6e31327 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -49,5 +49,5 @@ jobs: deploy: needs: [checks, quality] - uses: ecmwf/reusable-workflow/.github/workflows/cd-pypi.yml@v2 + uses: ecmwf-actions/reusable-workflows/blob/main/.github/workflows/cd-pypi.yml@v2 secrets: inherit From 9bc1105ac960b422efd1b3fc165b1641d094d998 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Wed, 7 Aug 2024 15:47:23 +0000 Subject: [PATCH 4/7] fix: another typo --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6e31327..27764b3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -49,5 +49,5 @@ jobs: deploy: needs: [checks, quality] - uses: ecmwf-actions/reusable-workflows/blob/main/.github/workflows/cd-pypi.yml@v2 + uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2 secrets: inherit From 6b7a33bcd2f40f91986e943598bf994b6ea04804 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Wed, 7 Aug 2024 15:51:10 +0000 Subject: [PATCH 5/7] chore: bump actions/setup-python to v5 --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 27764b3..de01bf6 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -35,7 +35,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} From 3746723400c290987f47ca70d4c59370f04e5093 Mon Sep 17 00:00:00 2001 From: theissenhelen Date: Fri, 9 Aug 2024 13:08:05 +0100 Subject: [PATCH 6/7] ci: run downstream-ci for changes in src and tests --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab853f5..5867ee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: - 'develop' tags-ignore: - '**' + paths: + - "src/**" + - "tests/**" # Trigger the workflow on pull request pull_request: ~ From 8506550a372bbee4aeb4cc0eb12e971ac2360049 Mon Sep 17 00:00:00 2001 From: theissenhelen Date: Fri, 9 Aug 2024 14:14:12 +0100 Subject: [PATCH 7/7] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5814934..abbc381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Keep it human-readable, your future self will thank you! ### Changed - Update CI to inherit from common infrastructue reusable workflows + - run downstream-ci only when src and tests folders have changed - New error messages for wrongs graphs.