update installation #43
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
# Consul acceptance tests running against OpenShift cluster | |
name: OpenShift Acceptance Tests | |
on: | |
push: | |
branches: | |
- 'anita/openshift_testing_ci' | |
# schedule: | |
# # Run on Monday (1),Wednesday (3),and Friday (5) at 6:00 AM UTC, 1:00 AM EST, 10:00 PM PST | |
# - cron: '0 6 * * 1,3,5' | |
jobs: | |
test-consul-on-openshift: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version: 1.22.7 | |
cache: false | |
- name: Install gotestsum | |
run: go install gotest.tools/[email protected] | |
- name: Setup helm | |
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | |
with: | |
version: 'v3.9.4' | |
- name: Install OpenShift Tools | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
crc: latest | |
oc: "3" | |
- name: Verify installations | |
run: | | |
crc version | |
oc version | |
- name: Start OKD cluster | |
run: | | |
crc setup | |
crc start --memory 12288 --cpus 6 --pull-secret-file <(echo '{"auths":{"fake":{"auth":"aW52YWxpZDppbnZhbGlk"}}}') | |
eval $(crc oc-env) | |
oc login -u kubeadmin -p $(crc console --credentials | grep kubeadmin | awk '{print $2}') https://api.crc.testing:6443 | |
- name: Verify OKD cluster | |
run: | | |
oc get nodes | |
oc get co | |
- name: Wait for Consul to be ready | |
run: | | |
oc wait --for=condition=ready pod -l app=consul --timeout=300s | |
- name: Run Acceptance Tests | |
run: | | |
# Add your Consul tests here | |
oc exec $(oc get pod -l app=consul -o jsonpath="{.items[0].metadata.name}") -- consul members | |
- name: Cleanup | |
if: always() | |
run: | | |
helm uninstall consul | |
crc stop | |
crc delete -f |