Skip to content

Commit

Permalink
Merge pull request openservicemesh#4772 from nojnhuh/ci
Browse files Browse the repository at this point in the history
Update Go CI config
  • Loading branch information
nojnhuh authored Jun 24, 2022
2 parents 8fd236e + db71482 commit 82f48f7
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 154 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
131 changes: 28 additions & 103 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: go build deps
run: make embed-files-test
- name: golangci-lint
Expand All @@ -58,10 +59,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: go mod tidy
run: make go-mod-tidy
- name: Codegen checks
Expand All @@ -73,10 +75,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: go mod tidy
run: make go-mod-tidy
- name: gomock checks
Expand All @@ -97,22 +100,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Go Build
run: make build-ci

Expand All @@ -123,22 +115,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: go mod tidy
run: make go-mod-tidy
- name: Test
Expand All @@ -149,35 +130,6 @@ jobs:
with:
flags: unittests

scenarios_tests:
name: Test various Envoy + SMI configuration scenarios
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Test
run: |
touch .env
make kind-up
go test -v ./tests/scenarios/...
imagescan:
name: Scan images for security vulnerabilities
runs-on: ubuntu-latest
Expand Down Expand Up @@ -221,22 +173,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Build test dependencies
env:
DOCKER_BUILDX_OUTPUT: type=docker
Expand Down Expand Up @@ -275,27 +216,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Restore Module Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}

- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
id: go

go-version-file: go.mod
cache: true
- name: Run Simulation w/ Tresor, SMI policies, egress disabled and reconciler disabled
env:
CERT_MANAGER: "tresor"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/nightly-noinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ jobs:
run: |
kubectl version
kubectl get nodes
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Install OSM via OSM CLI
run: |
make build-osm
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/openshift-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
insecure_skip_tls_verify: true
- name: Test oc
run: oc version --client
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Run e2es
run: |
make build-osm
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,11 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Restore Module Cache
uses: actions/cache@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomod2-
- name: Restore Build Cache
uses: actions/cache@v2
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
- name: Setup Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Build Binaries
run: |
make release-artifacts
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/windows-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
method: kubeconfig
kubeconfig: ${{ secrets.CI_WINDOWS_KUBECONFIG }}
id: setcontext
- name: Setup Go 1.17
uses: actions/setup-go@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version-file: go.mod
cache: true
- name: Run e2es
run: |
make build-osm
Expand Down
1 change: 0 additions & 1 deletion scripts/test-w-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -aueo pipefail
modules=$(go list ./... | \
grep -v tests/framework | \
grep -v tests/e2e | \
grep -v tests/scenarios | \
grep -v tests/scale | \
grep -v ci/ | \
grep -v demo/ | \
Expand Down
13 changes: 0 additions & 13 deletions tests/scenarios/suite_test.go

This file was deleted.

0 comments on commit 82f48f7

Please sign in to comment.