-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC: Add hosted integration testing #714
Open
sebrandon1
wants to merge
1
commit into
openshift-kni:main
Choose a base branch
from
sebrandon1:integration_testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+673
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,62 @@ | ||
name: setup-partner-cluster | ||
description: 'Setup a partner cluster for testing.' | ||
|
||
inputs: | ||
make-command: | ||
description: 'The make command to run.' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Check out `certsuite-sample-workload` | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
repository: redhat-best-practices-for-k8s/certsuite-sample-workload | ||
path: certsuite-sample-workload | ||
|
||
- name: Check if /etc/docker/daemon.json exists and if not, create it. | ||
shell: bash | ||
run: | | ||
if [ ! -f /etc/docker/daemon.json ]; then | ||
echo '{}' | sudo tee /etc/docker/daemon.json | ||
fi | ||
- name: Bootstrap cluster and docker | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make bootstrap-cluster; make bootstrap-docker-ubuntu-local | ||
|
||
- name: Mount docker volume to /mnt/sdb | ||
shell: bash | ||
run: | | ||
df -h | ||
lsblk | ||
if [ ! -d /mnt/docker-storage ]; then | ||
sudo mkdir /mnt/docker-storage | ||
fi | ||
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json | ||
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json | ||
cat /etc/docker/daemon.json | ||
sudo systemctl restart docker | ||
sudo ls -la /mnt/docker-storage | ||
- name: Run 'make rebuild-cluster' | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make rebuild-cluster | ||
|
||
- name: Run 'make ${{inputs.make-command}}' | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; python3 -m venv .venv; source .venv/bin/activate; pip install --upgrade pip; pip install jinjanator; cp .venv/bin/jinjanate .venv/bin/j2; make ${{ inputs.make-command }} | ||
|
||
- name: Show pods | ||
shell: bash | ||
run: oc get pods -A |
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,31 @@ | ||
name: Integration Testing | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
integration: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
SHELL: /bin/bash | ||
SKIP_PRELOAD_IMAGES: true | ||
KUBECONFIG: '/home/runner/.kube/config' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23.2 | ||
|
||
- name: Setup partner cluster | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove "partner" |
||
uses: ./.github/actions/setup-partner-cluster | ||
with: | ||
make-command: 'install-for-qe' | ||
|
||
- name: Run integration tests | ||
run: make integration-test |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove "partner" from code.