You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|tools.mod\|tools.sum' || :)
63
-
[[ -z "$changed_files" ]] || (printf "Some files are missing the headers: \n$changed_files\n Did you run 'make lint' before sending the PR" && exit 1)
64
-
- name: Check DeepCopy Generation
65
-
run: |
66
-
export GOPATH=$(go env GOPATH)
67
-
make deepcopy
70
+
if [[ -n "$changed_files" ]]; then
71
+
echo "❌ Some files are missing headers:\n$changed_files"
72
+
exit 1
73
+
fi
74
+
68
75
- name: Check Formatting
69
76
run: |
70
77
make fmt
71
78
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|tools.mod\|tools.sum' || :)
72
-
[[ -z "$changed_files" ]] || (printf "Some files are not formatted properly: \n$changed_files\n Did you run 'make test' before sending the PR?" && exit 1)
73
-
- name: Check lint
74
-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 - Please ALWAYS use SHA to avoid GH sec issues
79
+
if [[ -n "$changed_files" ]]; then
80
+
echo "❌ Some files are not formatted correctly:\n$changed_files"
81
+
exit 1
82
+
fi
83
+
84
+
- name: Run Linter
85
+
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.1.1 - Please ALWAYS use SHA to avoid GH sec issues
75
86
with:
76
87
version: latest
77
-
- name: Install cover
78
-
run: go get -modfile=tools.mod golang.org/x/tools/cmd/cover
88
+
89
+
- name: Install Cover Tool
90
+
run: go install golang.org/x/tools/cmd/cover@latest
91
+
79
92
- name: Run Unit Tests
93
+
run: go test ./... -coverprofile=test_coverage.out -covermode=atomic
94
+
95
+
- name: Upload Coverage Report
96
+
uses: actions/upload-artifact@v3
97
+
with:
98
+
name: Test Coverage Report
99
+
path: test_coverage.out
100
+
101
+
integration_tests:
102
+
name: Integration Tests
103
+
runs-on: ubuntu-latest
104
+
needs: basic_checks
105
+
steps:
106
+
- name: Checkout Code
107
+
uses: actions/checkout@v4
108
+
109
+
- name: Setup Go
110
+
uses: actions/setup-go@v5
111
+
with:
112
+
go-version: ${{ env.GO_VERSION }}
113
+
id: go
114
+
115
+
- name: Run Integration Tests
80
116
run: |
81
-
go test ./... -coverprofile test_coverage.out -covermode=atomic
0 commit comments