forked from cryostatio/cryostat-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
79 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Retest Integrated Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
checkout-repo: | ||
required: false | ||
type: string | ||
checkout-ref: | ||
required: false | ||
type: string | ||
build-arch: | ||
required: true | ||
type: string | ||
pr-number: | ||
required: false | ||
type: string | ||
sha-value: | ||
required: false | ||
type: string | ||
skip-itests: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
|
||
jobs: | ||
integration-tests: #test | ||
runs-on: ubuntu-latest | ||
if: ${{ !inputs.skip-itests }} | ||
steps: | ||
- name: Install xpath | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libxml-xpath-perl | ||
- name: Install qemu | ||
if: ${{ inputs.build-arch != 'amd64' }} | ||
continue-on-error: true | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y qemu-user-static | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.checkout-repo }} | ||
ref: ${{ inputs.checkout-ref }} | ||
submodules: true | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: maven-settings | ||
uses: s4u/maven-settings-action@v2 | ||
with: | ||
githubServer: true | ||
- name: ghcr login | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io/${{ github.repository_owner }} | ||
username: ${{ github.event.comment.user.login }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Pull cryostat image | ||
run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ inputs.pr-number }}-${{ inputs.sha-value }}-linux-${{ inputs.build-arch }} | ||
- name: retag image as quay | ||
run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ inputs.pr-number }}-${{ inputs.sha-value }}-linux-${{ inputs.build-arch}} quay.io/cryostat/cryostat | ||
- name: Run integration tests | ||
run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Print itest logs | ||
if: failure() | ||
run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat | ||
- name: Print itest container logs | ||
if: failure() | ||
run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs catyea |