Skip to content

Commit fd6d94a

Browse files
authored
Refactor, cleanup unittest/e2e. (#61)
Signed-off-by: Takeshi Yoneda <[email protected]>
1 parent 576f7c7 commit fd6d94a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+855
-1353
lines changed

.github/workflows/site.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: site
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'site/**'
7+
branches:
8+
- main
9+
push:
10+
paths:
11+
- 'site/**'
12+
branches:
13+
- main
14+
15+
jobs:
16+
manifest:
17+
name: test manifest/install script changes
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: checkout
21+
uses: actions/checkout@v2
22+
23+
- name: install script
24+
run: cat site/install.sh | bash
25+
26+
- name: add gemtesh cli to PATH
27+
run: test -f "${HOME}/.getmesh/bin/getmesh" && echo "${HOME}/.getmesh/bin" >> $GITHUB_PATH
28+
29+
- name: download all the istioctl
30+
run: |
31+
cat site/manifest.json | jq -r '.istio_distributions[] | [.version, .flavor, .flavor_version] | @csv' | tr -d '"' |
32+
while IFS=, read -r version flavor flavor_version; do
33+
getmesh fetch --version $version --flavor $flavor --flavor-version $flavor_version
34+
done

.github/workflows/workflow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
run: go mod download
8888

8989
- name: run
90-
run: make unit-test
90+
run: make test
9191

9292
- name: build
9393
run: go build .

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ make lint
2222
Running unittests does not require any k8s cluster, and it can be done by
2323

2424
```
25-
make unit-test
25+
make test
2626
```
2727

2828
### Build binary

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
.PHONY: all
2-
all: lint license build unit-test e2e-test doc-gen
2+
all: lint license build test e2e-test doc-gen
33

44
.PHONY: lint
55
lint:
66
golangci-lint run
77

88
.PHONY: license
99
license:
10-
addlicense -c "Tetrate" src/ cmd/ e2e/
10+
addlicense -c "Tetrate" internal/ cmd/ e2e/
1111

1212
.PHONY: build
1313
build:
1414
go build .
1515

16-
.PHONY: unit-test
17-
unit-test:
18-
go test -v ./src/... ./cmd/...
16+
.PHONY: test
17+
test:
18+
go test -v ./internal/... ./cmd/...
1919

2020
.PHONY: e2e-test
2121
e2e-test:

0 commit comments

Comments
 (0)