Skip to content

Commit

Permalink
update testing ci
Browse files Browse the repository at this point in the history
Signed-off-by: AliceProxy <[email protected]>
  • Loading branch information
AliceProxy committed Aug 15, 2023
1 parent 316e4b2 commit 722c403
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 35 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/licenses.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "License verification"
on:
pull_request:

env:
GO_VERSION: 1.20.7

jobs:
dependency_info_linux:
name: "Verify use of forbidden licenses"
Expand All @@ -15,7 +19,7 @@ jobs:
ref: "${{ github.event.pull_request.head.sha }}"
- uses: actions/setup-go@v3
with:
go-version: 1.20.6
go-version: "${{ env.GO_VERSION }}"
- name: "Generate dependency information"
shell: bash
run: make generate
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Test and Lint"

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

env:
GO_VERSION: 1.20.7

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout local
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "${{env.GO_VERSION}}"

- name: Lint
run: |
make lint
go-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout local
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ github.event.pull_request.head.sha }}"

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "${{env.GO_VERSION}}"

- name: go unit tests
run: |
make go-unit-test
26 changes: 0 additions & 26 deletions .github/workflows/unit_tests.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ following Free and Open Source software:

Name Version License(s)
---- ------- ----------
the Go language standard library ("std") v1.20.6 3-clause BSD license
the Go language standard library ("std") v1.20.7 3-clause BSD license
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 MIT license
github.com/BurntSushi/toml v1.1.0 MIT license
github.com/MakeNowJust/heredoc v1.0.0 MIT license
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ format: $(tools/golangci-lint) ## (QA) Automatically fix linter complaints
$(tools/golangci-lint) run --fix --timeout 2m ./... || true

lint: $(tools/golangci-lint) ## (QA) Run the linter
$(tools/golangci-lint) run --timeout 8m ./...
$(tools/golangci-lint) run --timeout 20m ./...


.PHONY: protoc
Expand Down Expand Up @@ -119,13 +119,16 @@ image-tar: image
mkdir -p ./build-output
docker save $(IMAGE) > ./build-output/ambassador-agent-image.tar

.PHONY: itest
itest:
go test -p 1 ./integration_tests/...
.PHONY: go-integration-test
go-integration-test:
go mod download
go test -parallel 1 ./integration_tests/... -race

.PHONY: unit-test
unit-test:
go test -count=1 ./cmd/... ./pkg/...
.PHONY: go-unit-test
go-unit-test:
go mod download
go test ./cmd/... -race
go test ./pkg/... -race

.PHONY: apply
apply: push-image
Expand Down

0 comments on commit 722c403

Please sign in to comment.