File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will build mcad and run unit test and E2E tests
2
+ name : MCAD-CI
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - ' main'
7
+ - ' release-*'
8
+
9
+ jobs :
10
+ MCAD-CI :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : checkout code
15
+ uses : actions/checkout@v3
16
+ with :
17
+ ref : " refs/pull/${{ github.event.number }}/merge"
18
+ fetch-depth : 0
19
+ env :
20
+ GIT_BRANCH : ${{ github.HEAD_REF }}
21
+ TAG : $(git describe --abbrev=0 --tags)
22
+
23
+ - name : Set up Go
24
+ uses : actions/setup-go@v3
25
+ with :
26
+ go-version : 1.18.10
27
+
28
+ - name : Build
29
+ run :
30
+ make mcad-controller
31
+
32
+ - name : Run Unit tests
33
+ run : make run-test
34
+
35
+ - name : Build Image
36
+ run : |
37
+ make images -e GIT_BRANCH=$GIT_BRANCH TAG=$TAG
38
+
39
+ - name : Run E2E tests
40
+ run : |
41
+ make run-e2e -e GIT_BRANCH=$GIT_BRANCH TAG=$TAG
42
+
Original file line number Diff line number Diff line change
1
+
2
+ # Skip CI check when running as a pull request
3
+ if : " $TRAVIS_PULL_REQUEST != false"
4
+
1
5
language : go
2
6
3
7
sudo : required
@@ -25,8 +29,6 @@ script:
25
29
- make run-test
26
30
# Process 'make images' when NOT a pull request
27
31
- ' if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then make images; fi'
28
- # Process 'make images' when running as a pull request
29
- - ' if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unset quay_repository && make images; fi'
30
32
# Process 'make push-images' when NOT a pull request
31
33
- ' if [[ "$TRAVIS_PULL_REQUEST" == "false" && ! "$TRAVIS_BRANCH" =~ "^v[0-9]\.[0-9]+\.[0-9]+" ]]; then make push-images; fi'
32
34
# Run the e2e and handle Travis condition where Travis fails on no output for 10 minutes. No output for 10 minutes
You can’t perform that action at this time.
0 commit comments