-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
828581f
commit 8cf787b
Showing
2 changed files
with
42 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,62 @@ | ||
name: Test | ||
|
||
# This workflow is triggered on pull requests to the main branch. | ||
on: | ||
# This workflow is triggered on pull requests to the main branch. | ||
pull_request: | ||
branches: [main] | ||
types: [milestoned, opened, synchronize] | ||
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow). | ||
types: [milestoned, opened, reopened, synchronize] | ||
paths-ignore: | ||
- "**.md" | ||
- "**.jpg" | ||
- "**.png" | ||
- "**.gif" | ||
- "**.svg" | ||
- "adr/**" | ||
- "docs/**" | ||
- ".gitignore" | ||
- "renovate.json" | ||
- ".release-please-config.json" | ||
- "release-please-config.json" | ||
- "oscal-component.yaml" | ||
- "CODEOWNERS" | ||
- "LICENSE" | ||
- "CONTRIBUTING.md" | ||
- "SECURITY.md" | ||
- adr/** | ||
- docs/** | ||
- .gitignore | ||
- renovate.json | ||
- .release-please-config.json | ||
- release-please-config.json | ||
- CODEOWNERS | ||
- LICENSE | ||
- CONTRIBUTING.md | ||
- SECURITY.md | ||
- config/renovate.json5 | ||
|
||
# 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. | ||
id-token: write | ||
|
||
# Abort prior jobs in the same workflow / PR | ||
concurrency: | ||
group: test-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
run-test: | ||
name: ${{ matrix.type }} ${{ matrix.flavor }} | ||
runs-on: 'uds-swf-ubuntu-big-boy-4-core' | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
flavor: [upstream, unicorn, registry1] | ||
type: [install, upgrade] | ||
# do not run upgrade tests for unicorn | ||
# TODO @WSTARR: remove after first unicorn release | ||
exclude: | ||
- flavor: unicorn | ||
type: upgrade | ||
|
||
check-flavor: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
|
||
- name: Environment setup | ||
uses: defenseunicorns/uds-common/.github/actions/setup@0780ed64a7b76920526046b8c3b8c7251a4bf2f0 # v1.0.0 | ||
with: | ||
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} | ||
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} | ||
ghToken: ${{ secrets.GITHUB_TOKEN }} | ||
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }} | ||
|
||
- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | ||
|
||
- name: Test | ||
uses: defenseunicorns/uds-common/.github/actions/test@0780ed64a7b76920526046b8c3b8c7251a4bf2f0 # v1.0.0 | ||
with: | ||
flavor: ${{ matrix.flavor }} | ||
type: ${{ matrix.type }} | ||
|
||
- name: Debug Output | ||
if: ${{ always() }} | ||
uses: defenseunicorns/uds-common/.github/actions/debug-output@0780ed64a7b76920526046b8c3b8c7251a4bf2f0 # v1.0.0 | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
|
||
- name: Save logs | ||
if: always() | ||
uses: defenseunicorns/uds-common/.github/actions/save-logs@0780ed64a7b76920526046b8c3b8c7251a4bf2f0 # v1.0.0 | ||
with: | ||
suffix: ${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
- name: test-flavor | ||
uses: ./.github/actions/test-flavor | ||
id: test-flavor | ||
outputs: | ||
upgrade-flavors: ${{ steps.test-flavor.outputs.upgrade-flavors }} | ||
|
||
- uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1 | ||
if: always() | ||
with: | ||
name: playwright-report-${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }} | ||
path: tests/.playwright/reports/ | ||
retention-days: 30 | ||
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@/additional_artifacts | ||
with: | ||
upgrade-flavors: ${{ needs.check-flavor.outputs.upgrade-flavors }} | ||
flavor: ${{ matrix.flavor }} | ||
type: ${{ matrix.type }} | ||
secrets: inherit # Inherits all secrets from the parent workflow. |