Repository navigation
ci: run the CNTi essential tests nightly and show the result as a badge #669
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
martin-mat
wants to merge
1
commit into
edgecomllc:main
Choose a base branch
from
martin-mat:cnti-essential
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.
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 hidden or 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 @@ | ||
| # CNTi Test Suite configuration for the essential tests run by | ||
| # .github/workflows/cnti.yml. The chart is installed with its defaults; the | ||
| # only settings are the released image tags the rolling update, downgrade | ||
| # and rollback tests move to. | ||
| --- | ||
| config_version: "v2" | ||
| common: | ||
| container_names: | ||
| - name: eupf | ||
| rolling_update_test_tag: "0.7.0" | ||
| rolling_downgrade_test_tag: "0.6.4" | ||
| rolling_version_change_test_tag: "0.7.0" | ||
| rollback_from_tag: "0.7.0" | ||
| deployments: | ||
| helm_dirs: | ||
| - name: eupf | ||
| helm_directory: ../../.deploy/helm/eupf | ||
| namespace: eupf |
This file contains hidden or 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,17 @@ | ||
| # kind cluster for the CNTi essential tests: a control plane and two workers, | ||
| # so node_drain has somewhere to move eUPF. The chart sets the unsafe sysctl | ||
| # net.ipv4.ip_forward, which every kubelet has to allow, or the pod is | ||
| # rejected at admission (see the chart README). | ||
| kind: Cluster | ||
| apiVersion: kind.x-k8s.io/v1alpha4 | ||
| nodes: | ||
| - role: control-plane | ||
| kubeadmConfigPatches: &allow-ip-forward | ||
| - | | ||
| kind: KubeletConfiguration | ||
| allowedUnsafeSysctls: | ||
| - "net.ipv4.ip_forward" | ||
| - role: worker | ||
| kubeadmConfigPatches: *allow-ip-forward | ||
| - role: worker | ||
| kubeadmConfigPatches: *allow-ip-forward |
This file contains hidden or 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,74 @@ | ||
| # Installs the eUPF chart with its defaults on a kind cluster every night, | ||
| # runs the CNTi Test Suite's essential tests against it and publishes the | ||
| # result as the badge in the README. https://github.com/lfn-cnti/testsuite-action | ||
| # | ||
| # For problems with the action or the test suite, open an issue at | ||
| # https://github.com/lfn-cnti/testsuite-action/issues | ||
| name: CNTi essential | ||
|
|
||
| on: | ||
| schedule: | ||
| # Off the full hour: GitHub delays or drops scheduled runs under load, | ||
| # which peaks at the start of each hour. | ||
| - cron: "37 3 * * *" | ||
| # By hand, and on pull requests that change the job, its configuration or | ||
| # the chart. | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/cnti.yml | ||
| - .github/cnti/** | ||
| - .deploy/helm/eupf/** | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # The nightly run and manual runs on main: the only runs that publish the | ||
| # badge, and the only ones with a write token. Forks that enable scheduled | ||
| # workflows do not run either job. | ||
| essential: | ||
| if: github.repository == 'edgecomllc/eupf' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| # Publishes the badge to the orphan branch `badges`. | ||
| contents: write | ||
| steps: &essential-steps | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| # The suite doesn't need the job's write token; the action passes it | ||
| # to the badge publisher on its own. | ||
| persist-credentials: false | ||
|
|
||
| - uses: lfn-cnti/testsuite-action@70536fda55fcb11f4f7463175fe9d57c86b85574 # v1.2.0 | ||
| with: | ||
| # A released suite version, bumped on purpose after reading the | ||
| # release notes. | ||
| version: v2.3.0 | ||
| cnf_config: .github/cnti/cnti-testsuite.yaml | ||
| kind_config: .github/cnti/kind.yaml | ||
| tests: cert | ||
| badge_branch: badges | ||
|
|
||
| # Why did eUPF not come up? Pod state, events and logs from the kind | ||
| # cluster the action created; it lives until the job ends. | ||
| - name: Diagnostics | ||
| if: failure() | ||
| run: | | ||
| set +e | ||
| kubectl get pods -A -o wide | ||
| kubectl describe pods -n eupf | tail -80 | ||
| kubectl logs -n eupf --all-containers --tail=60 -l app.kubernetes.io/name=eupf | ||
| kubectl get events -n eupf --sort-by=.lastTimestamp | tail -40 | ||
|
|
||
| # Pull requests that change the job or its configuration, and manual runs on | ||
| # other branches: the same steps with a read-only token. The action publishes | ||
| # the badge only from the default branch, so nothing is published here. | ||
| essential-pr: | ||
| if: github.repository == 'edgecomllc/eupf' && (github.event_name == 'pull_request' || github.ref != 'refs/heads/main') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read | ||
| steps: *essential-steps | ||
This file contains hidden or 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.
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 add path
.deploy/helm/eupf/**as well. What do you think?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.
Agreed, added in 433c780: pull requests that change the chart now run the essential tests too (read-only, nothing is published from a pull request). I also moved the job to the latest suite release, v2.3.0; the run on this pull request passes with 15 of 19, the same as before.