Skip to content

Commit

Permalink
Create a Github action for MCAD CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
Srihari1192 committed Jul 24, 2023
1 parent b9b87ea commit 696ef07
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/mcad-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build mcad and run unit test and E2E tests
name: MCAD-CI
on:
pull_request:
branches:
- 'main'

jobs:
MCAD-CI:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.10

- name: Build
run: make mcad-controller

- name: Run Unit tests
run: make run-test

- name: Build Image
run: |
make images
- name: Run E2E tests
run: |
make run-e2e
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

# Skip CI check when running as a pull request
if: "$TRAVIS_PULL_REQUEST != false"

language: go

sudo: required
Expand Down Expand Up @@ -25,8 +29,6 @@ script:
- make run-test
# Process 'make images' when NOT a pull request
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then make images; fi'
# Process 'make images' when running as a pull request
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unset quay_repository && make images; fi'
# Process 'make push-images' when NOT a pull request
- 'if [[ "$TRAVIS_PULL_REQUEST" == "false" && ! "$TRAVIS_BRANCH" =~ "^v[0-9]\.[0-9]+\.[0-9]+" ]]; then make push-images; fi'
# Run the e2e and handle Travis condition where Travis fails on no output for 10 minutes. No output for 10 minutes
Expand Down

0 comments on commit 696ef07

Please sign in to comment.