Skip to content
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

fix: Decouple integration tests from name of service #148

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ jobs:
ENABLE_E2E_TEST: true
BRANCH: ${{ github.head_ref || github.ref_name }}
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
GOPROXY: "https://proxy.golang.org"
steps:
- name: Checkout keptn-contrib/keptn-service-template-go
- name: Checkout code
uses: actions/[email protected]
with:
repository: keptn-sandbox/keptn-service-template-go
path: keptn-service-template-go

- name: Install Go
uses: actions/[email protected]
with:
go-version-file: "go.mod"

- name: Load CI Environment from .ci_env
id: load_ci_env
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .ci_env

# Download artifacts from last CI run
- name: Download artifacts
uses: dawidd6/[email protected]
Expand Down Expand Up @@ -76,17 +80,20 @@ jobs:
run: |
curl -X GET "${{ steps.install_keptn.outputs.KEPTN_ENDPOINT }}/v1/metadata" -H "accept: application/json" -H "x-token: ${{ steps.install_keptn.outputs.KEPTN_API_TOKEN }}"

# Install Keptn-Service-Template-Go from downloaded helm chart
- name: Install Keptn-Service-Template-Go
# Install service from downloaded helm chart
- name: Install service
run: |
helm upgrade --install --create-namespace -n keptn keptn-service-template-go \
./dist/helm-charts/keptn-service-template-go-*.tgz \
helm upgrade --install --create-namespace -n keptn ${{ env.IMAGE }} \
./dist/helm-charts/*.tgz \
--wait

- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@latest

- name: Run integration tests
env:
KEPTN_ENDPOINT: ${{ steps.install_keptn.outputs.KEPTN_ENDPOINT }}
KEPTN_API_TOKEN: ${{ steps.install_keptn.outputs.KEPTN_API_TOKEN }}
shell: bash
working-directory: keptn-service-template-go
run: go test -race -v ./...
run: gotestsum ./test/e2e/...