generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split verification test gh workflows (#24)
* unify gh workflow names * extract common gh actions * split operator-verify gh workflow * remove pull specific conditions from push gh jobs * fixes after rebase * fixes after rebase; rename gh action create-single-cluster; fix calling mandatory gh action collect-cluster-info
- Loading branch information
Showing
12 changed files
with
177 additions
and
138 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,10 @@ | ||
name: 'Collect cluster-info' | ||
description: 'Action for collecting cluster-info' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: collect cluster-info | ||
if: ${{ always() }} | ||
run: make -C tests/operator cluster-info | ||
shell: bash |
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,16 @@ | ||
name: 'Create k3d cluster' | ||
description: 'Action for creating k3d cluster' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: create k3d cluster | ||
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0 | ||
with: | ||
cluster-name: "k3dCluster" | ||
args: >- | ||
--agents 1 | ||
--image rancher/k3s:v1.29.3-k3s1 | ||
--port 80:80@loadbalancer | ||
--port 443:443@loadbalancer | ||
--wait |
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,10 @@ | ||
name: 'Setup go' | ||
description: 'Action for the go setup' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' |
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,4 +1,4 @@ | ||
name: "Create release" | ||
name: create release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
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,4 +1,4 @@ | ||
name: Images verify | ||
name: images verify | ||
run-name: ${{github.event.pull_request.title}} | ||
on: | ||
pull_request: | ||
|
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,26 @@ | ||
name: integration tests (pull) | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'examples/**' | ||
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft] | ||
|
||
jobs: | ||
operator-integration-test: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/rebase | ||
- uses: ./.github/actions/setup-go | ||
- uses: ./.github/actions/create-k3d-cluster | ||
- name: run test | ||
run: | | ||
make -C components/operator deploy | ||
make -C tests/operator test | ||
env: | ||
IMG: europe-docker.pkg.dev/kyma-project/dev/dockerregistry-operator:PR-${{ github.event.number }} | ||
- if: ${{ always() }} | ||
uses: ./.github/actions/collect-cluster-info |
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,49 @@ | ||
name: integration tests (push) | ||
|
||
on: | ||
push: | ||
branches: [ "main", "release-*" ] | ||
|
||
jobs: | ||
operator-integration-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-go | ||
- uses: ./.github/actions/create-k3d-cluster | ||
- name: run test | ||
run: | | ||
make -C components/operator deploy | ||
make -C tests/operator test | ||
env: | ||
IMG: europe-docker.pkg.dev/kyma-project/prod/dockerregistry-operator:${{ github.sha }} | ||
- if: ${{ always() }} | ||
uses: ./.github/actions/collect-cluster-info | ||
|
||
gardener-integration-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-go | ||
- name: save service-account | ||
shell: bash | ||
run: 'echo "$GARDENER_SA" > /tmp/gardener-sa.yaml' | ||
env: | ||
GARDENER_SA: ${{ secrets.GARDENER_SA }} | ||
- name: provision gardener | ||
run: make -C hack provision-gardener | ||
env: | ||
GARDENER_SECRET_NAME: ${{ secrets.GARDENER_SECRET_NAME }} | ||
GARDENER_PROJECT: ${{ secrets.GARDENER_PROJECT }} | ||
GARDENER_SA_PATH: /tmp/gardener-sa.yaml | ||
- name: run test | ||
run: | | ||
make -C components/operator deploy | ||
make -C tests/operator test | ||
env: | ||
IMG: europe-docker.pkg.dev/kyma-project/prod/dockerregistry-operator:${{ github.sha }} | ||
- name: deprovision gardener | ||
if: ${{ always() }} | ||
run: make -C hack deprovision-gardener | ||
env: | ||
GARDENER_SA_PATH: /tmp/gardener-sa.yaml |
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,20 @@ | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'components/operator/**' | ||
- '.github/**' | ||
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft] | ||
|
||
jobs: | ||
lint: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/rebase | ||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
working-directory: 'components/operator' |
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,4 +1,4 @@ | ||
name: Markdown | ||
name: markdown | ||
run-name: ${{github.event.pull_request.title}} | ||
on: | ||
schedule: | ||
|
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
name: unit tests | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'examples/**' | ||
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft] | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/rebase | ||
- uses: ./.github/actions/setup-go | ||
- name: run test | ||
run: make -C components/operator 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: upgrade tests | ||
|
||
on: | ||
push: | ||
branches: [ "main", "release-*" ] | ||
|
||
jobs: | ||
#TODO: after the first release bring this test back with deploy-release target | ||
# operator-upgrade-test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: ./.github/actions/setup-go | ||
# - uses: ./.github/actions/create-k3d-cluster | ||
# - name: upgrade test | ||
# run: | | ||
# make -C components/operator deploy-release | ||
# make -C tests/operator test | ||
# make -C components/operator deploy | ||
# make -C tests/operator test | ||
# env: | ||
# IMG: europe-docker.pkg.dev/kyma-project/prod/dockerregistry-operator:${{ github.sha }} | ||
# - if: ${{ always() }} | ||
# uses: ./.github/actions/collect-cluster-info | ||
|