Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Addon] Refactor addon tests CI workflow #410

Merged
merged 2 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/addon-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Check addon semver
run: |
make check-addon-semver

- name: Install ginkgo
run: |
sudo apt-get update
Expand Down Expand Up @@ -84,9 +88,19 @@ jobs:
vela cluster join /tmp/worker.kubeconfig --name worker
vela cluster list

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done

- name: Addon e2e-test
run: |
make addon-test
go run test/e2e-test/addon-test/main.go ${{ steps.changed-files.outputs.all_changed_files }}



Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ standard-metrics-test:
standard-autoscaler-test:
cd ./traits/autoscalertrait && make test

addon-test:
check-addon-semver:
bash ./test/e2e-test/hack/check-semver.sh
bash ./test/e2e-test/hack/addon-vela-test.sh


terraform-addon-gen:
go run hack/addons/terraform/gen.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"flink-cluster": {
annotations: {}
attributes: workload: definition: {
apiVersion: "flink.apache.org/v1alpha1"
kind: "FlinkDeployment"
}
attributes: workload: type: "autodetects.core.oam.dev"
description: "Flink Component."
labels: {}
type: "component"
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ module github.com/oam-dev/catalog
go 1.17

require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/Masterminds/sprig/v3 v3.2.2
github.com/go-yaml/yaml v2.1.0+incompatible
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449
helm.sh/helm/v3 v3.6.1
sigs.k8s.io/yaml v1.2.0
)

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/Microsoft/hcsshim v0.8.14 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
7 changes: 7 additions & 0 deletions test/e2e-test/addon-test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/oam-dev/catalog/test/e2e-test/addon-test

go 1.17

require sigs.k8s.io/yaml v1.3.0

require gopkg.in/yaml.v2 v2.4.0 // indirect
6 changes: 6 additions & 0 deletions test/e2e-test/addon-test/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
Loading