-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from mamercad/e2e-in-gha
Add K3s End-to-End Workflow in GitHub (Experimental)
- Loading branch information
Showing
3 changed files
with
117 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,115 @@ | ||
name: Lint & E2E Tests (Experimental) | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
helm-lint: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Update stackstorm-ha chart dependencies | ||
run: | | ||
set -x | ||
helm dependency update | ||
- name: Helm lint | ||
run: | | ||
helm lint | ||
- name: Cache community | ||
id: cache-community | ||
uses: actions/cache@v3 | ||
with: | ||
path: community | ||
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }} | ||
|
||
- name: Helm template | ||
if: steps.cache-community.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
helm template --output-dir community . | ||
k8s-lint: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
needs: [helm-lint] | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache community | ||
id: cache-community | ||
uses: actions/cache@v3 | ||
with: | ||
path: community | ||
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }} | ||
|
||
- name: Kubernetes kubeval lint | ||
uses: instrumenta/kubeval-action@master | ||
with: | ||
files: community | ||
|
||
helm-e2e: | ||
needs: [k8s-lint] | ||
runs-on: ubuntu-22.04 | ||
# NOTE: Just a thought in case the timeouts fail; might not be | ||
# necessary, but might not hurt either, would vary based on the | ||
# size of the testing matrix, too. | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
# TODO: Document which versions we support and cover them. | ||
k3s-channel: | ||
- "v1.25.4+k3s1" | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up K3s | ||
id: k3s | ||
uses: jupyterhub/action-k3s-helm@v3 | ||
with: | ||
k3s-channel: ${{ matrix.k3s-channel }} | ||
|
||
- name: Update stackstorm-ha chart dependencies | ||
run: | | ||
set -x | ||
helm dependency update | ||
- name: Helm install | ||
run: | | ||
helm install --timeout 10m0s --debug --wait \ | ||
--name-template stackstorm-ha . | ||
- name: Helm test | ||
run: | | ||
helm test stackstorm-ha | ||
- name: Helm upgrade with RBAC enabled | ||
run: | | ||
helm upgrade --set st2.rbac.enabled=true \ | ||
--timeout 5m0s --debug --wait stackstorm-ha . | ||
- name: Helm test | ||
run: | | ||
helm test stackstorm-ha | ||
- name: Show all Kubernetes resources | ||
if: ${{ always() }} | ||
run: | | ||
kubectl get all |
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
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