diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c911e61..09197c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,14 +50,20 @@ jobs: envs/env1.yaml envs/env2.yaml expected-failure: ["false"] + policy-file: ["policy.yaml"] include: - env-paths: | envs/failing-env1.yaml + policy-file: "policy.yaml" expected-failure: "true" - env-paths: | envs/env1.yaml envs/failing-env1.yaml + policy-file: "policy.yaml" expected-failure: "true" + - env-paths: "envs/env1.yaml" + policy-file: policy_no_extra_options.yaml + expected-failure: "false" steps: - name: clone the repository @@ -67,7 +73,7 @@ jobs: id: action-run continue-on-error: true with: - policy: policy.yaml + policy: ${{ matrix.policy-file }} environment-paths: ${{ matrix.env-paths }} today: 2024-12-20 - name: detect outcome diff --git a/README.md b/README.md index 69ac401..62b3fba 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,17 @@ policy: - package4 ``` -then add a new step to CI: +If there are no packages with `overrides`, `exclude`, or `ignored_violations`, you can set +them to an empty mapping or sequence, respectively: + +```yaml + ... + overrides: {} + exclude: [] + ignored_violations: [] +``` + +Then add a new step to CI: ```yaml jobs: diff --git a/policy_no_extra_options.yaml b/policy_no_extra_options.yaml new file mode 100644 index 0000000..b89a03f --- /dev/null +++ b/policy_no_extra_options.yaml @@ -0,0 +1,14 @@ +channels: + - conda-forge +platforms: + - noarch + - linux-64 +policy: + # all packages in months + packages: + python: 30 + numpy: 18 + default: 12 + overrides: {} + exclude: [] + ignored_violations: []