Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f68f04dc
Commit
f68f04dc
authored
Mar 06, 2024
by
Derek Nola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run docker tests in E2E GH Action
Build image with new input option Run most of the basic docker tests in E2E Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
83d1a2cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
22 deletions
+65
-22
build-k3s.yaml
.github/workflows/build-k3s.yaml
+10
-0
e2e.yaml
.github/workflows/e2e.yaml
+34
-5
integration.yaml
.github/workflows/integration.yaml
+4
-3
test
scripts/test
+17
-14
No files found.
.github/workflows/build-k3s.yaml
View file @
f68f04dc
...
@@ -7,6 +7,10 @@ on:
...
@@ -7,6 +7,10 @@ on:
type
:
boolean
type
:
boolean
required
:
false
required
:
false
default
:
false
default
:
false
upload-image
:
type
:
boolean
required
:
false
default
:
false
permissions
:
permissions
:
contents
:
read
contents
:
read
...
@@ -23,6 +27,9 @@ jobs:
...
@@ -23,6 +27,9 @@ jobs:
run
:
|
run
:
|
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 make
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 make
sha256sum dist/artifacts/k3s | sed 's|dist/artifacts/||' > dist/artifacts/k3s.sha256sum
sha256sum dist/artifacts/k3s | sed 's|dist/artifacts/||' > dist/artifacts/k3s.sha256sum
-
name
:
Build K3s image
if
:
inputs.upload-image ==
true
run
:
make package-image
-
name
:
bundle repo
-
name
:
bundle repo
if
:
inputs.upload-repo ==
true
if
:
inputs.upload-repo ==
true
run
:
|
run
:
|
...
@@ -34,6 +41,9 @@ jobs:
...
@@ -34,6 +41,9 @@ jobs:
with
:
with
:
name
:
k3s-repo.tar.gz
name
:
k3s-repo.tar.gz
path
:
k3s-repo.tar.gz
path
:
k3s-repo.tar.gz
-
name
:
"
Save
K3s
image"
if
:
inputs.upload-image ==
true
run
:
docker image save rancher/k3s -o ./dist/artifacts/k3s-image.tar
-
name
:
"
Upload
K3s
binary"
-
name
:
"
Upload
K3s
binary"
if
:
inputs.upload-repo ==
false
if
:
inputs.upload-repo ==
false
uses
:
actions/upload-artifact@v4
uses
:
actions/upload-artifact@v4
...
...
.github/workflows/e2e.yaml
View file @
f68f04dc
...
@@ -26,8 +26,10 @@ permissions:
...
@@ -26,8 +26,10 @@ permissions:
jobs
:
jobs
:
build
:
build
:
uses
:
./.github/workflows/build-k3s.yaml
uses
:
./.github/workflows/build-k3s.yaml
test
:
with
:
name
:
"
E2E
Test"
upload-image
:
true
e2e
:
name
:
"
E2E
Tests"
needs
:
build
needs
:
build
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
timeout-minutes
:
40
timeout-minutes
:
40
...
@@ -64,7 +66,7 @@ jobs:
...
@@ -64,7 +66,7 @@ jobs:
name
:
k3s
name
:
k3s
path
:
./dist/artifacts
path
:
./dist/artifacts
-
name
:
Run
E2E Tests
-
name
:
Run
${{ matrix.etest }} Test
env
:
env
:
E2E_GOCOVER
:
"
true"
E2E_GOCOVER
:
"
true"
run
:
|
run
:
|
...
@@ -83,4 +85,31 @@ jobs:
...
@@ -83,4 +85,31 @@ jobs:
token
:
${{ secrets.CODECOV_TOKEN }}
token
:
${{ secrets.CODECOV_TOKEN }}
files
:
tests/e2e/${{ matrix.etest }}/coverage.out
files
:
tests/e2e/${{ matrix.etest }}/coverage.out
flags
:
e2etests
# optional
flags
:
e2etests
# optional
verbose
:
true
# optional (default = false)
verbose
:
true
# optional (default = false)
\ No newline at end of file
docker
:
needs
:
build
name
:
Docker Tests
runs-on
:
ubuntu-latest
timeout-minutes
:
20
strategy
:
fail-fast
:
false
matrix
:
dtest
:
[
basics
,
bootstraptoken
,
cacerts
,
lazypull
,
upgrade
]
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
with
:
fetch-depth
:
1
-
name
:
"
Download
k3s
image"
uses
:
actions/download-artifact@v4
with
:
name
:
k3s
path
:
./dist/artifacts
-
name
:
Load k3s image
run
:
docker image load -i ./dist/artifacts/k3s-image.tar
-
name
:
Run ${{ matrix.dtest }} Test
run
:
|
chmod +x ./dist/artifacts/k3s
. ./tests/docker/test-helpers
. ./tests/docker/test-run-${{ matrix.dtest }}
echo "Did test-run-${{ matrix.dtest }} pass $?"
\ No newline at end of file
.github/workflows/integration.yaml
View file @
f68f04dc
...
@@ -31,10 +31,10 @@ env:
...
@@ -31,10 +31,10 @@ env:
jobs
:
jobs
:
build
:
build
:
uses
:
./.github/workflows/build-k3s.yaml
uses
:
./.github/workflows/build-k3s.yaml
test
:
i
test
:
needs
:
build
needs
:
build
name
:
Integration Tests
name
:
Integration Tests
runs-on
:
ubuntu-
20.04
runs-on
:
ubuntu-
latest
timeout-minutes
:
45
timeout-minutes
:
45
strategy
:
strategy
:
fail-fast
:
false
fail-fast
:
false
...
@@ -71,4 +71,4 @@ jobs:
...
@@ -71,4 +71,4 @@ jobs:
with
:
with
:
files
:
./${{ matrix.itest }}.out
files
:
./${{ matrix.itest }}.out
flags
:
inttests
# optional
flags
:
inttests
# optional
verbose
:
true
# optional (default = false)
verbose
:
true
# optional (default = false)
\ No newline at end of file
scripts/test
View file @
f68f04dc
...
@@ -20,9 +20,24 @@ mkdir -p $artifacts
...
@@ -20,9 +20,24 @@ mkdir -p $artifacts
docker ps
docker ps
# ---
# ---
# Only run basic tests on non amd64 archs, we use GitHub Actions for amd64
if
[
"
$ARCH
"
!=
'amd64'
]
;
then
.
./tests/docker/test-run-basics
.
./tests/docker/test-run-basics
echo
"Did test-run-basics
$?
"
echo
"Did test-run-basics
$?
"
.
./tests/docker/test-run-cacerts
echo
"Did test-run-cacerts
$?
"
.
./tests/docker/test-run-bootstraptoken
echo
"Did test-run-bootstraptoken
$?
"
.
./tests/docker/test-run-upgrade
echo
"Did test-run-upgrade
$?
"
.
./tests/docker/test-run-lazypull
echo
"Did test-run-lazypull
$?
"
fi
.
./tests/docker/test-run-compat
.
./tests/docker/test-run-compat
echo
"Did test-run-compat
$?
"
echo
"Did test-run-compat
$?
"
...
@@ -30,21 +45,9 @@ echo "Did test-run-compat $?"
...
@@ -30,21 +45,9 @@ echo "Did test-run-compat $?"
.
./tests/docker/test-run-hardened
.
./tests/docker/test-run-hardened
echo
"Did test-run-hardened
$?
"
echo
"Did test-run-hardened
$?
"
.
./tests/docker/test-run-cacerts
echo
"Did test-run-cacerts
$?
"
.
./tests/docker/test-run-bootstraptoken
echo
"Did test-run-bootstraptoken
$?
"
.
./tests/docker/test-run-upgrade
echo
"Did test-run-upgrade
$?
"
.
./tests/docker/test-run-etcd
.
./tests/docker/test-run-etcd
echo
"Did test-run-etcd
$?
"
echo
"Did test-run-etcd
$?
"
.
./tests/docker/test-run-lazypull
echo
"Did test-run-lazypull
$?
"
# ---
# ---
[
"
$ARCH
"
!=
'amd64'
]
&&
\
[
"
$ARCH
"
!=
'amd64'
]
&&
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment