|
94 | 94 | inputs: ./test/*.txt
|
95 | 95 | staging: true
|
96 | 96 | internal-be-careful-debug: true
|
| 97 | + - name: Check outputs |
| 98 | + run: | |
| 99 | + [[ -f ./test/artifact.txt.sigstore ]] || exit 1 |
| 100 | + [[ -f ./test/artifact1.txt.sigstore ]] || exit 1 |
| 101 | + [[ -f ./test/artifact2.txt.sigstore ]] || exit 1 |
| 102 | +
|
| 103 | + selftest-xfail-glob-input-expansion: |
| 104 | + runs-on: ubuntu-latest |
| 105 | + env: |
| 106 | + TEST_DIR: test |
| 107 | + if: (github.event_name != 'pull_request') || !github.event.pull_request.head.repo.fork |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@v3 |
| 110 | + - name: Sign artifacts and publish signatures |
| 111 | + continue-on-error: true |
| 112 | + uses: ./ |
| 113 | + id: sigstore-python |
| 114 | + with: |
| 115 | + # This should fail since we should never directly expand ${TEST_DIR}; |
| 116 | + # the user should have to pre-expand it for us. |
| 117 | + inputs: ./${TEST_DIR}/*.txt |
| 118 | + staging: true |
| 119 | + internal-be-careful-debug: true |
| 120 | + - name: Check failure |
| 121 | + env: |
| 122 | + XFAIL: ${{ steps.sigstore-python.outcome == 'failure' }} |
| 123 | + JOB_NAME: ${{ github.job }} |
| 124 | + run: | |
| 125 | + echo "xfail ${JOB_NAME}: ${XFAIL}" |
| 126 | +
|
| 127 | + [[ "${XFAIL}" == "true" ]] || { >&2 echo "expected step to fail"; exit 1; } |
| 128 | +
|
| 129 | + selftest-glob-multiple: |
| 130 | + runs-on: ubuntu-latest |
| 131 | + if: (github.event_name != 'pull_request') || !github.event.pull_request.head.repo.fork |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@v3 |
| 134 | + - name: Sign artifacts and publish signatures |
| 135 | + uses: ./ |
| 136 | + id: sigstore-python |
| 137 | + with: |
| 138 | + inputs: ./test/artifact*.txt ./test/another*.txt ./test/subdir/*.txt |
| 139 | + staging: true |
| 140 | + internal-be-careful-debug: true |
| 141 | + - name: Check outputs |
| 142 | + run: | |
| 143 | + [[ -f ./test/artifact.txt.sigstore ]] || exit 1 |
| 144 | + [[ -f ./test/artifact1.txt.sigstore ]] || exit 1 |
| 145 | + [[ -f ./test/artifact2.txt.sigstore ]] || exit 1 |
| 146 | + [[ -f ./test/another1.txt.sigstore ]] || exit 1 |
| 147 | + [[ -f ./test/another2.txt.sigstore ]] || exit 1 |
| 148 | + [[ -f ./test/subdir/hello1.txt.sigstore ]] || exit 1 |
| 149 | + [[ -f ./test/subdir/hello2.txt.sigstore ]] || exit 1 |
| 150 | + [[ -f ./test/subdir/hello3.txt.sigstore ]] || exit 1 |
97 | 151 |
|
98 | 152 | selftest-upload-artifacts:
|
99 | 153 | runs-on: ubuntu-latest
|
@@ -234,6 +288,7 @@ jobs:
|
234 | 288 | - selftest-xfail-invalid-inputs
|
235 | 289 | - selftest-staging
|
236 | 290 | - selftest-glob
|
| 291 | + - selftest-glob-multiple |
237 | 292 | - selftest-upload-artifacts
|
238 | 293 | - selftest-custom-paths
|
239 | 294 | - selftest-verify
|
|
0 commit comments