Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(action): migrating to github action from travis #27

Merged
merged 4 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,64 @@ jobs:
- name: Upload Coverage Report
uses: codecov/codecov-action@v1

bdd-test:
needs: ['unit-test']
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
kubernetes: [v1.20.1]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14.7

- name: Setup Minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Build images locally
run: make lvm-driver-image || exit 1;

- name: bootstrap
run: make bootstrap

- name: Running tests
run: ./ci/ci-test.sh

ansible:
runs-on: ubuntu-latest
needs: ['lint', 'unit-test', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push the ansible image
uses: docker/build-push-action@v2
with:
file: ./e2e-tests/Dockerfile
push: true
load: false
platforms: linux/amd64
tags: |
${{ secrets.IMAGE_ORG}}/lvm-localpv-e2e:ci

csi-driver:
runs-on: ubuntu-latest
needs: ['lint', 'unit-test']
needs: ['lint', 'unit-test', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
33 changes: 32 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,41 @@ jobs:
- name: Upload Coverage Report
uses: codecov/codecov-action@v1

bdd-test:
needs: ['unit-test']
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
kubernetes: [v1.20.1]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14.7

- name: Setup Minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Build images locally
run: make lvm-driver-image || exit 1;

- name: bootstrap
run: make bootstrap

- name: Running tests
run: ./ci/ci-test.sh

csi-driver:
runs-on: ubuntu-latest
needs: ['lint', 'unit-test']
needs: ['lint', 'unit-test', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions changelogs/unreleased/27-pawanpraka1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
move the bdd test cases to github action
10 changes: 7 additions & 3 deletions ci/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ set -e

# setup the lvm volume group to create the volume
truncate -s 1024G /tmp/disk.img
disk=`losetup -f /tmp/disk.img --show`
pvcreate "$disk"
vgcreate lvmvg "$disk"
disk=`sudo losetup -f /tmp/disk.img --show`
sudo pvcreate "$disk"
sudo vgcreate lvmvg "$disk"

# install snapshot module for lvm
sudo modprobe dm-snapshot

LVM_OPERATOR=deploy/lvm-operator.yaml
SNAP_CLASS=deploy/sample/lvmsnapclass.yaml

export LVM_NAMESPACE="openebs"
export TEST_DIR="tests"
export NAMESPACE="kube-system"
export KUBECONFIG=$HOME/.kube/config

# Prepare env for running BDD tests
# Minikube is already running
Expand Down