mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-04 04:09:49 +00:00
Introduction of Integration Tests (#3695)
* Commit of new etcd snapshot integration tests. * Updated integration github action to not run on doc changes. * Update Drone runner to only run unit tests Signed-off-by: dereknola <derek.nola@suse.com>
This commit is contained in:
59
.github/workflows/integration.yaml
vendored
Normal file
59
.github/workflows/integration.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: Integration Test Coverage
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: "Make"
|
||||
run: DOCKER_BUILDKIT=1 SKIP_VALIDATE=1 make
|
||||
- name: "Upload k3s binary"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: k3s
|
||||
path: dist/artifacts/k3s
|
||||
test:
|
||||
needs: build
|
||||
name: Integration Tests
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.16.5'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: "Download k3s binary"
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: k3s
|
||||
path: ./dist/artifacts
|
||||
- name: Run Integration Tests
|
||||
run: |
|
||||
chmod +x ./dist/artifacts/k3s
|
||||
go test -coverpkg=./... -coverprofile=coverage.out ./pkg/... -run Integration
|
||||
go tool cover -func coverage.out
|
||||
- name: On Failure, Launch Debug Session
|
||||
if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: 5
|
||||
- name: Upload Results To Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
files: ./coverage.out
|
||||
flags: inttests # optional
|
||||
verbose: true # optional (default = false)
|
||||
4
.github/workflows/unitcoverage.yaml
vendored
4
.github/workflows/unitcoverage.yaml
vendored
@@ -25,12 +25,12 @@ jobs:
|
||||
fetch-depth: 1
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
go test -coverpkg=./... -covermode=atomic -coverprofile=coverage.out ./pkg/...
|
||||
go test -coverpkg=./... -coverprofile=coverage.out ./pkg/... -run Unit
|
||||
go tool cover -func coverage.out
|
||||
- name: On Failure, Launch Debug Session
|
||||
if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: 2
|
||||
timeout-minutes: 5
|
||||
- name: Upload Results To Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user