-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(actions): move travis tests to github actions (#223)
Signed-off-by: shubham <[email protected]>
- Loading branch information
1 parent
32b9453
commit 4d9034f
Showing
5 changed files
with
176 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,66 @@ jobs: | |
pattern: '*.sh' | ||
exclude: './.git/*,./vendor/*' | ||
|
||
unit-tests: | ||
name: unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.7 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: verify license | ||
run: make license-check | ||
|
||
- name: verify dependencies | ||
run: make deps | ||
|
||
- name: verify tests | ||
run: make test | ||
|
||
e2e-tests: | ||
needs: ['unit-tests'] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes: [v1.18.6] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Minikube-Kubernetes | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: v1.9.2 | ||
kubernetes version: ${{ matrix.kubernetes }} | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set tag | ||
run: | | ||
BRANCH="${GITHUB_REF##*/}" | ||
CI_TAG=${BRANCH#v}-ci | ||
if [ ${BRANCH} = "master" ]; then | ||
CI_TAG="ci" | ||
fi | ||
echo "TAG=${CI_TAG}" >> $GITHUB_ENV | ||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV | ||
- name: Build images locally | ||
run: make all.amd64 || exit 1; | ||
|
||
- name: Running tests | ||
run: ./ci/sanity/install.sh && ./ci/sanity/sanity.sh | ||
|
||
cspc-operator: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
needs: ['lint', 'e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -79,7 +136,7 @@ jobs: | |
cvc-operator: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
needs: ['lint', 'e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -125,7 +182,7 @@ jobs: | |
pool-manager: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
needs: ['lint', 'e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -171,7 +228,7 @@ jobs: | |
volume-manager: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
needs: ['lint', 'e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -217,7 +274,7 @@ jobs: | |
cstor-webhook: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
needs: ['lint', 'e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
path: '.' | ||
pattern: '*.sh' | ||
exclude: './vendor/*' | ||
|
||
cspc-operator: | ||
runs-on: ubuntu-latest | ||
needs: ['lint'] | ||
|
@@ -151,3 +151,57 @@ jobs: | |
env: | ||
IMG_RESULT: cache | ||
run: make docker.buildx.cstor-webhook | ||
|
||
unit-tests: | ||
name: unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.7 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: verify license | ||
run: make license-check | ||
|
||
- name: verify dependencies | ||
run: make deps | ||
|
||
- name: verify tests | ||
run: make test | ||
|
||
e2e-tests: | ||
needs: ['unit-tests'] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes: [v1.18.6] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Minikube-Kubernetes | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: v1.9.2 | ||
kubernetes version: ${{ matrix.kubernetes }} | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set tag | ||
run: | | ||
BRANCH="${GITHUB_REF##*/}" | ||
CI_TAG="ci" | ||
echo "TAG=${CI_TAG}" >> $GITHUB_ENV | ||
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV | ||
- name: Build images locally | ||
run: make all.amd64 || exit 1; | ||
|
||
- name: Running tests | ||
run: ./ci/sanity/install.sh && ./ci/sanity/sanity.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,62 @@ on: | |
- 'v*' | ||
|
||
jobs: | ||
unit-tests: | ||
name: unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.7 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: verify license | ||
run: make license-check | ||
|
||
- name: verify dependencies | ||
run: make deps | ||
|
||
- name: verify tests | ||
run: make test | ||
|
||
e2e-tests: | ||
needs: ['unit-tests'] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes: [v1.18.6] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Minikube-Kubernetes | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: v1.9.2 | ||
kubernetes version: ${{ matrix.kubernetes }} | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set Tag | ||
run: | | ||
TAG="${GITHUB_REF#refs/*/v}" | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
echo "RELEASE_TAG=${TAG}" >> $GITHUB_ENV | ||
- name: Build images locally | ||
run: make all.amd64 || exit 1; | ||
|
||
- name: Running tests | ||
run: ./ci/sanity/install.sh && ./ci/sanity/sanity.sh | ||
|
||
cspc-operator: | ||
runs-on: ubuntu-latest | ||
needs: ['e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
@@ -61,6 +115,7 @@ jobs: | |
cvc-operator: | ||
runs-on: ubuntu-latest | ||
needs: ['e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
@@ -101,6 +156,7 @@ jobs: | |
pool-manager: | ||
runs-on: ubuntu-latest | ||
needs: ['e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
@@ -141,6 +197,7 @@ jobs: | |
volume-manager: | ||
runs-on: ubuntu-latest | ||
needs: ['e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
@@ -181,6 +238,7 @@ jobs: | |
cstor-webhook: | ||
runs-on: ubuntu-latest | ||
needs: ['e2e-tests'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters