-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (63 loc) · 2.14 KB
/
wc-integration-test.yml
File metadata and controls
66 lines (63 loc) · 2.14 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:
fully-qualified-image-name:
required: true
type: string
image-basename:
required: true
type: string
image-digest:
required: true
type: string
test-file:
required: true
type: string
build-test-runner-labels:
required: true
type: string
registry:
required: true
type: string
secrets:
DOCKER_REGISTRY_USERNAME:
required: true
DOCKER_REGISTRY_PASSWORD:
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@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ !cancelled() }}
with:
name: test-results-integration-${{ inputs.image-basename }}-${{ steps.runner-arch.outputs.arch }}
path: test-report-*.xml