|
6 | 6 | paths: |
7 | 7 | - .test/** |
8 | 8 | - .github/workflows/test-action-build-html.yml |
9 | | - - actions/ansibe-docs-build-html/** |
| 9 | + - actions/ansible-docs-build-html/** |
10 | 10 | pull_request: |
11 | 11 | paths: |
12 | 12 | - .test/** |
13 | 13 | - .github/workflows/test-action-build-html.yml |
14 | | - - actions/ansibe-docs-build-html/** |
| 14 | + - actions/ansible-docs-build-html/** |
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | tests: |
@@ -104,10 +104,16 @@ jobs: |
104 | 104 | assert output_hash == expected_hash |
105 | 105 | assert artifact_hash == output_hash |
106 | 106 |
|
107 | | - - name: Simple 3 - assert artifact url |
108 | | - # this URL only goes to the run page, not to an individual artifact |
109 | | - # so all we're really checking here is that it's a valid URL that's accessible |
110 | | - run: wget '${{ steps.simple3.outputs.artifact-url }}' |
| 107 | + - name: Simple 3 - bash asserts |
| 108 | + run: | |
| 109 | + set -eu |
| 110 | +
|
| 111 | + # this URL only goes to the run page, not to an individual artifact |
| 112 | + # so all we're really checking here is that it's a valid URL that's accessible |
| 113 | + wget '${{ steps.simple3.outputs.artifact-url }}' |
| 114 | +
|
| 115 | + # ensure that the html directory is not present in the downloaded artifact |
| 116 | + test ! -d "${{ steps.simple3-artifact.outputs.download-path }}/html" |
111 | 117 |
|
112 | 118 | - name: Simple 4 invoke - with copy, with artifact |
113 | 119 | id: simple4 |
@@ -140,7 +146,55 @@ jobs: |
140 | 146 | assert output_hash == original_build_hash |
141 | 147 | assert artifact_hash == output_hash |
142 | 148 |
|
143 | | - - name: Simple 4 - assert artifact url |
144 | | - # this URL only goes to the run page, not to an individual artifact |
145 | | - # so all we're really checking here is that it's a valid URL that's accessible |
146 | | - run: wget '${{ steps.simple4.outputs.artifact-url }}' |
| 149 | + - name: Simple 4 - bash asserts |
| 150 | + run: | |
| 151 | + set -eu |
| 152 | +
|
| 153 | + # this URL only goes to the run page, not to an individual artifact |
| 154 | + # so all we're really checking here is that it's a valid URL that's accessible |
| 155 | + wget '${{ steps.simple4.outputs.artifact-url }}' |
| 156 | +
|
| 157 | + # ensure that the html directory is not present in the downloaded artifact |
| 158 | + test ! -d "${{ steps.simple4-artifact.outputs.download-path }}/html" |
| 159 | +
|
| 160 | + - name: Simple 5 invoke - with copy, with artifact, trailing slash in input |
| 161 | + id: simple5 |
| 162 | + uses: ./actions/ansible-docs-build-html |
| 163 | + with: |
| 164 | + build-script: .test/simple-build/build.sh |
| 165 | + build-html: .test/simple-build/build/html/ |
| 166 | + copy-build: .copies/simple5/html/ |
| 167 | + artifact-retention-days: 1 |
| 168 | + artifact-name: tests-simple5 |
| 169 | + |
| 170 | + - name: Simple 5 - Download artifacts |
| 171 | + uses: actions/download-artifact@v2 |
| 172 | + id: simple5-artifact |
| 173 | + with: |
| 174 | + name: ${{ steps.simple5.outputs.artifact-name }} |
| 175 | + path: .artifacts/simple5 |
| 176 | + |
| 177 | + - name: Simple 5 - assert |
| 178 | + shell: python |
| 179 | + run: | |
| 180 | + expected_hash = r'${{ hashFiles('.test/simple-build/src') }}' |
| 181 | + output_hash = r'${{ steps.simple5.outputs.hash }}' |
| 182 | + output_build_html = r'${{ steps.simple5.outputs.build-html }}' |
| 183 | + artifact_hash = r'${{ hashFiles(steps.simple5-artifact.outputs.download-path) }}' |
| 184 | + original_build_hash = r'${{ hashFiles('.test/simple-build/build/html/') }}' |
| 185 | +
|
| 186 | + assert output_build_html == '.copies/simple5/html/' |
| 187 | + assert output_hash == expected_hash |
| 188 | + assert output_hash == original_build_hash |
| 189 | + assert artifact_hash == output_hash |
| 190 | +
|
| 191 | + - name: Simple 5 - bash asserts |
| 192 | + run: | |
| 193 | + set -eu |
| 194 | +
|
| 195 | + # this URL only goes to the run page, not to an individual artifact |
| 196 | + # so all we're really checking here is that it's a valid URL that's accessible |
| 197 | + wget '${{ steps.simple5.outputs.artifact-url }}' |
| 198 | +
|
| 199 | + # ensure that the html directory is not present in the downloaded artifact |
| 200 | + test ! -d "${{ steps.simple5-artifact.outputs.download-path }}/html" |
0 commit comments