File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ "develop", "release-candidate", "main" ]
6+ pull_request :
7+ branches : [ "develop", "release-candidate", "main" ]
8+ schedule :
9+ - cron : ' 00 7 * * 1'
10+
11+ jobs :
12+ unit-test :
13+ name : Unit Test
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-go@v5
18+ with :
19+ go-version-file : " go.mod"
20+ - name : Run ginkgo tests
21+ run : go run github.com/onsi/ginkgo/v2/ginkgo -r --procs=3 --compilers=3 --randomize-all --randomize-suites --fail-on-pending --keep-going --race --trace helpers
22+
23+ fail-prs-to-main :
24+ name : Fail PRs to main
25+ if : github.event_name == 'pull_request'
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Check PR target branch
29+ run : |
30+ if [ "${{ github.event.pull_request.base.ref }}" == "main" ]; then
31+ echo "Pull requests should not target 'main' branch."
32+ exit 1
33+ fi
34+
35+ fail-prs-to-release-candidate :
36+ name : Fail PRs to release-candidate
37+ if : github.event_name == 'pull_request'
38+ runs-on : ubuntu-latest
39+ steps :
40+ - name : Check PR target branch
41+ run : |
42+ if [ "${{ github.event.pull_request.base.ref }}" == "release-candidate" ]; then
43+ echo "Pull requests should not target 'release-candidate' branch."
44+ exit 1
45+ fi
You can’t perform that action at this time.
0 commit comments