-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 2.13 KB
/
test.yaml
File metadata and controls
68 lines (58 loc) · 2.13 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
67
68
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
name: Test
on:
# This workflow is triggered on pull requests to the main branch.
pull_request:
# milestoned is added here so that a PR can be re-triggered if it is milestoned.
types: [milestoned, opened, reopened, synchronize]
# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
pull-requests: read
id-token: write
# Abort prior jobs in the same workflow / PR
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
check-flavor:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: test-flavor
uses: defenseunicorns/uds-common/.github/actions/test-flavor@730d22c6e061153d525a6d6f932e108ae952bd46 # v1.23.0
id: test-flavor
outputs:
upgrade-flavors: ${{ steps.test-flavor.outputs.upgrade-flavors }}
validate:
needs: check-flavor
strategy:
fail-fast: false
matrix:
type: [install, upgrade]
flavor: [upstream, unicorn, registry1]
uses: defenseunicorns/uds-common/.github/workflows/callable-test.yaml@730d22c6e061153d525a6d6f932e108ae952bd46 # v1.23.0
with:
timeout: 30
options: --set BASE_REPO="ghcr.io/uds-packages"
runsOn: appstore-8-core-amd64
upgrade-flavors: ${{ needs.check-flavor.outputs.upgrade-flavors }}
flavor: ${{ matrix.flavor }}
type: ${{ matrix.type }}
secrets: inherit # Inherits all secrets from the parent workflow.
verify-test:
runs-on: ubuntu-latest
needs: validate
if: always()
steps:
- name: Check validate result
run: |
echo "validate result: ${{ needs.validate.result }}"
if [ "${{ needs.validate.result }}" != "success" ]; then
echo "One or more tests failed."
exit 1
fi
echo "All tests passed successfully!"