From 8c731c24b9a4f933b167f6f0e6dba6a185ba839a Mon Sep 17 00:00:00 2001 From: Jakub Recman Date: Thu, 20 Mar 2025 14:37:19 +0100 Subject: [PATCH 1/7] Switch actions org from ecmwf-actions to ecmwf --- .github/workflows/ci.yaml | 2 +- .github/workflows/label-public-pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a1d0869..5423fb5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: name: downstream-ci if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }} # FIXME: revert to main when ready - uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@add-conflator + uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@add-conflator with: conflator: ecmwf/conflator@${{ github.event.pull_request.head.sha || github.sha }} codecov_upload: true diff --git a/.github/workflows/label-public-pr.yml b/.github/workflows/label-public-pr.yml index 52f3b87..1baa87b 100644 --- a/.github/workflows/label-public-pr.yml +++ b/.github/workflows/label-public-pr.yml @@ -7,4 +7,4 @@ on: jobs: label: - uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2 \ No newline at end of file + uses: ecmwf/reusable-workflows/.github/workflows/label-pr.yml@v2 \ No newline at end of file From 699fb767811fdd75e3fc20a65c8fe1e37b2d42a4 Mon Sep 17 00:00:00 2001 From: Oisin-M <60450429+Oisin-M@users.noreply.github.com> Date: Tue, 25 Nov 2025 10:19:15 +0000 Subject: [PATCH 2/7] fix: change downstream ci to use main branch --- .github/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a1d0869..5acdfe8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,8 +19,7 @@ jobs: downstream-ci: name: downstream-ci if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }} - # FIXME: revert to main when ready - uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@add-conflator + uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main with: conflator: ecmwf/conflator@${{ github.event.pull_request.head.sha || github.sha }} codecov_upload: true @@ -159,4 +158,4 @@ jobs: PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | poetry build - poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD \ No newline at end of file + poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD From 327067c02ba72ca32aa36c025ea586731738c9f5 Mon Sep 17 00:00:00 2001 From: awarde96 Date: Mon, 1 Dec 2025 10:07:05 +0000 Subject: [PATCH 3/7] Remove pytest dependency and bump version --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4a57ea0..1a11c32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "conflator" -version = "0.1.7" +version = "0.1.8" description = "Load small app configurations from environment variables, command line arguments and config files, according to a pydantic model." authors = ["James Hawkes "] readme = "README.md" @@ -11,7 +11,6 @@ repository = "https://github.com/ecmwf/conflator/" python = ">3.9" pydantic = ">2.0" rich-argparse = ">1.0" -pytest = ">8.0" pyyaml = ">6.0" From 2247557c414d74f3a88f7f23664c48b8d4e08f9f Mon Sep 17 00:00:00 2001 From: awarde96 Date: Mon, 1 Dec 2025 11:00:50 +0000 Subject: [PATCH 4/7] Remove legacy ci workflows --- .github/workflows/ci.yaml | 112 -------------------------------------- 1 file changed, 112 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5ec388e..c71c5a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,119 +26,7 @@ jobs: python_qa: true secrets: inherit - # qa: - # name: qa - # runs-on: ubuntu-20.04 - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v3 - # with: - # repository: ${{ inputs.repository }} - # ref: ${{ inputs.ref }} - - # - name: Setup Python - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ inputs.python_version }} - - # - name: Install Python Dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install black==23.1.0 - # python -m pip install flake8 isort - # - name: Check isort - # run: isort --check . - - # - name: Check black - # run: black --check . - - # - name: Check flake8 - # run: flake8 . - # setup: - # name: setup - # runs-on: ubuntu-20.04 - # outputs: - # matrix: ${{ steps.set-matrix.outputs.matrix }} - # inputs: ${{ steps.prepare-inputs.outputs.inputs }} - # inputs-for-ubuntu: ${{ steps.prepare-inputs.outputs.inputs-for-ubuntu }} - # steps: - # - name: Set Matrix - # id: set-matrix - # shell: bash -eux {0} - # run: | - # MATRIX=$(cat << 'EOS' - # name: - # - gnu-11@ubuntu-22.04 - # - clang-14@ubuntu-22.04 - # include: - # - name: gnu-11@ubuntu-22.04 - # os: ubuntu-22.04 - # compiler: gnu-11 - # compiler_cc: gcc-11 - # compiler_cxx: g++-11 - # compiler_fc: gfortran-11 - # - name: clang-14@ubuntu-22.04 - # os: ubuntu-22.04 - # compiler: clang-14 - # compiler_cc: clang-14 - # compiler_cxx: clang++-14 - # compiler_fc: gfortran-11 - # # Xcode compiler requires empty environment variables, so we pass null (~) here - # EOS - # ) - # SKIP_MATRIX_JOBS=$(cat << 'EOS' - # ${{ inputs.skip_matrix_jobs }} - # EOS - # ) - # SELECT_NAME_COND="1 != 1" - # SELECT_INCLUDE_COND="1 != 1" - # for skip_job in $SKIP_MATRIX_JOBS; do SELECT_NAME_COND="$SELECT_NAME_COND or . == \"$skip_job\""; SELECT_INCLUDE_COND="$SELECT_INCLUDE_COND or .name == \"$skip_job\""; done - # echo matrix=$(echo "$MATRIX" | yq eval "del(.name[] | select($SELECT_NAME_COND)) | del(.include[] | select($SELECT_INCLUDE_COND))" --output-format json --indent 0 -) >> $GITHUB_OUTPUT - # - name: Prepare build-package Inputs - # id: prepare-inputs - # shell: bash -eux {0} - # run: | - # echo inputs=$(echo "${{ inputs.build_package_inputs || '{}' }}" | yq eval '.' --output-format json --indent 0 -) >> $GITHUB_OUTPUT - # echo inputs-for-ubuntu=$(echo "${{ inputs.build_package_inputs || '{}' }}" | yq eval '. * {"os":"ubuntu-20.04","compiler":"gnu-10","compiler_cc":"gcc-10","compiler_cxx":"g++-10","compiler_fc":"gfortran-10"}' --output-format json --indent 0 -) >> $GITHUB_OUTPUT - test: - name: test - needs: - # - qa - # - setup - - downstream-ci - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.setup.outputs.matrix) }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python_version }} - - - name: Install Python Dependencies - run: | - python -m pip install --upgrade pip - pip install --upgrade pip setuptools wheel - python -m pip install pytest pytest-cov - python -m pip install -r requirements.txt - python -m pip install -r ./tests/requirements_test.txt - - - name: Run Tests with Repository Code - env: - LD_LIBRARY_PATH: ${{ steps.install-dependencies.outputs.lib_path }} - shell: bash -eux {0} - run: | - DYLD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} python -m pytest tests --cov=./ --cov-report=xml - python -m coverage report - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: coverage.xml deploy: - needs: test if: ${{ github.event_name == 'release' }} name: Upload to Pypi runs-on: ubuntu-latest From 5e1aeff296efdc68e6e1da9670fc2b7b19880af4 Mon Sep 17 00:00:00 2001 From: oisin-m Date: Mon, 1 Dec 2025 11:16:59 +0000 Subject: [PATCH 5/7] chore: remove unused tox ga --- .github/workflows/tox.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/tox.yml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml deleted file mode 100644 index 8d9c967..0000000 --- a/.github/workflows/tox.yml +++ /dev/null @@ -1,25 +0,0 @@ -# name: Test with tox - -# on: -# - push -# - pull_request - -# jobs: -# build: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# python-version: ['3.9', '3.10', '3.11', '3.12'] - -# steps: -# - uses: actions/checkout@v3 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v4 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# python -m pip install tox tox-gh-actions -# - name: Test with tox -# run: tox \ No newline at end of file From 606eb41c52eaefa79f34b02f9fce26aaf4ed9d9e Mon Sep 17 00:00:00 2001 From: mathleur Date: Mon, 1 Dec 2025 12:18:11 +0100 Subject: [PATCH 6/7] remove unused action --- .github/workflows/tox.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/tox.yml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml deleted file mode 100644 index 8d9c967..0000000 --- a/.github/workflows/tox.yml +++ /dev/null @@ -1,25 +0,0 @@ -# name: Test with tox - -# on: -# - push -# - pull_request - -# jobs: -# build: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# python-version: ['3.9', '3.10', '3.11', '3.12'] - -# steps: -# - uses: actions/checkout@v3 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v4 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# python -m pip install tox tox-gh-actions -# - name: Test with tox -# run: tox \ No newline at end of file From 4603b1f2e273d73f46f33f94306c133a840d2e36 Mon Sep 17 00:00:00 2001 From: oisin-m Date: Mon, 1 Dec 2025 11:18:26 +0000 Subject: [PATCH 7/7] fix: avoid duplicated cd actions --- .github/workflows/ci.yaml | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c71c5a9..081e3a0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,17 +5,21 @@ on: branches: - 'main' - 'develop' + tags-ignore: + - '**' + # Trigger the workflow on pull request pull_request: ~ + # Trigger the workflow manually workflow_dispatch: ~ + # Trigger after public PR approved for CI pull_request_target: types: [labeled] - release: - types: [created] + jobs: - + # Run CI including downstream packages on self-hosted runners downstream-ci: name: downstream-ci if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }} @@ -25,25 +29,3 @@ jobs: codecov_upload: true python_qa: true secrets: inherit - - deploy: - if: ${{ github.event_name == 'release' }} - name: Upload to Pypi - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install poetry - - name: Build and publish - env: - PYPI_USERNAME: "__token__" - PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - poetry build - poetry publish --username=$PYPI_USERNAME --password=$PYPI_PASSWORD