Run unit tests and coverage for operator api (#2010)
This commit is contained in:
57
.github/workflows/jobs.yaml
vendored
57
.github/workflows/jobs.yaml
vendored
@@ -1194,6 +1194,52 @@ jobs:
|
||||
./restapi/coverage/
|
||||
key: ${{ runner.os }}-coverage-restapi-2-${{ github.run_id }}
|
||||
|
||||
test-operatorapi-on-go:
|
||||
name: Test Operatorapi on Go ${{ matrix.go-version }} and ${{ matrix.os }}
|
||||
needs:
|
||||
- lint-job
|
||||
- no-warnings-and-make-assets
|
||||
- reuse-golang-dependencies
|
||||
- vulnerable-dependencies-checks
|
||||
- semgrep-static-code-analysis
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ 1.17.x ]
|
||||
os: [ ubuntu-latest ]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
name: Go Mod Cache
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
|
||||
- name: Build on ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: on
|
||||
GOOS: linux
|
||||
run: |
|
||||
make test-unit-test-operator
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: coverage-cache-unittest-operatorapi
|
||||
name: Coverage Cache unit test operatorAPI
|
||||
with:
|
||||
path: |
|
||||
./operatorapi/coverage/
|
||||
key: ${{ runner.os }}-coverage-unittest-operatorapi-2-${{ github.run_id }}
|
||||
|
||||
b-integration-tests:
|
||||
name: Integration Tests with Latest Distributed MinIO
|
||||
needs:
|
||||
@@ -1286,6 +1332,7 @@ jobs:
|
||||
needs:
|
||||
- b-integration-tests
|
||||
- test-restapi-on-go
|
||||
- test-operatorapi-on-go
|
||||
- c-operator-api-tests
|
||||
- test-pkg-on-go
|
||||
- sso-integration
|
||||
@@ -1356,6 +1403,14 @@ jobs:
|
||||
./restapi/coverage/
|
||||
key: ${{ runner.os }}-coverage-restapi-2-${{ github.run_id }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: coverage-cache-unittest-operatorapi
|
||||
name: Coverage Cache unit test operatorAPI
|
||||
with:
|
||||
path: |
|
||||
./operatorapi/coverage/
|
||||
key: ${{ runner.os }}-coverage-unittest-operatorapi-2-${{ github.run_id }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: coverage-cache-pkg
|
||||
name: Coverage Cache Pkg
|
||||
@@ -1375,7 +1430,7 @@ jobs:
|
||||
echo "go build gocoverage.go"
|
||||
go build gocovmerge.go
|
||||
echo "put together the outs for final coverage resolution"
|
||||
./gocovmerge ../integration/coverage/system.out ../replication/coverage/replication.out ../sso-integration/coverage/sso-system.out ../restapi/coverage/coverage.out ../pkg/coverage/coverage-pkg.out ../operator-integration/coverage/operator-api.out > all.out
|
||||
./gocovmerge ../integration/coverage/system.out ../replication/coverage/replication.out ../sso-integration/coverage/sso-system.out ../restapi/coverage/coverage.out ../pkg/coverage/coverage-pkg.out ../operator-integration/coverage/operator-api.out ../operatorapi/coverage/coverage-unit-test-operatorapi.out > all.out
|
||||
echo "Download mc for Ubuntu"
|
||||
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
echo "Change the permissions to execute mc command"
|
||||
|
||||
Reference in New Issue
Block a user