-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (63 loc) · 2.16 KB
/
wc-integration-test-docker.yml
File metadata and controls
66 lines (63 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: 🐳 Integration Test
on:
workflow_call:
inputs:
build-test-runner-labels:
required: true
type: string
fully-qualified-image-name:
required: true
type: string
image-basename:
required: true
type: string
image-digest:
required: true
type: string
registry:
required: true
type: string
test-file:
required: true
type: string
secrets:
DOCKER_REGISTRY_PASSWORD:
required: true
DOCKER_REGISTRY_USERNAME:
required: true
permissions: {}
jobs:
run-test:
name: 🐳 Integration Test (${{ (startsWith(matrix.runner, '[') && endsWith(matrix.runner, ']')) && join(matrix.runner, ', ') || matrix.runner }})
strategy:
matrix:
runner: ${{ fromJson(inputs.build-test-runner-labels) }}
runs-on: ${{ matrix.runner }}
container:
image: ${{ inputs.fully-qualified-image-name }}@${{ inputs.image-digest }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }}
permissions:
contents: read
steps:
- uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: echo "arch=$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
id: runner-arch
- run: bats --formatter junit "${TEST_FILE}" | tee "test-report-${IMAGE_BASENAME}-${RUNNER_ARCH}.xml"
env:
IMAGE_BASENAME: ${{ inputs.image-basename }}
TEST_FILE: ${{ inputs.test-file }}
RUNNER_ARCH: ${{ steps.runner-arch.outputs.arch }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: ${{ !cancelled() }}
with:
name: test-results-integration-docker-${{ inputs.image-basename }}-${{ steps.runner-arch.outputs.arch }}
path: test-report-*.xml