diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bf630b7..979a257 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,36 @@ concurrency: cancel-in-progress: false jobs: + tests: + name: test code + runs-on: "ubuntu-latest" + if: github.event.pull_request.title != 'relock w/ conda-lock' + steps: + - uses: actions/checkout@v4 + + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: 3.11 + channels: conda-forge + channel-priority: strict + show-channel-urls: true + miniforge-version: latest + + - name: install deps + shell: bash -leo pipefail {0} + run: | + conda install --yes \ + click \ + ruamel.yaml \ + conda \ + conda-lock \ + pytest + + - name: run tests + shell: bash -leo pipefail {0} + run: | + pytest -vvs test_relock.py + tests-lock: name: test updates runs-on: "ubuntu-latest" diff --git a/action.yml b/action.yml index 914c79d..571ff36 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,13 @@ inputs: required: true default: 'conda-lock.yml' ignored-packages: - description: 'comma-separated list of packages whose version changes are ignored when relocking' + description: 'comma- or newline-separated list of packages whose version changes are ignored when relocking' + required: true + default: '' + include-only-packages: + description: > + comma-or newline-separated list of packages to exclusively include when relocking, all others will be ignored, + ignored-packages is applied to this list required: true default: '' relock-all-packages: @@ -94,6 +100,7 @@ runs: --lock-file=${{ inputs.lock-file }} \ --ignored-packages=${{ inputs.ignored-packages }} \ --relock-all-packages=${{ inputs.relock-all-packages }} \ + --include-only-packages=${{ inputs.include-only-packages }} \ > ${{ github.action_path }}/summary.txt { echo 'summary<