mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-11 22:10:11 +01:00
chore(actions): move bdd tests to github actions (#293)
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
This commit is contained in:
parent
6ec49df225
commit
6c6d593437
5 changed files with 95 additions and 64 deletions
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
|
|
@ -44,9 +44,55 @@ jobs:
|
||||||
- name: Upload Coverage Report
|
- name: Upload Coverage Report
|
||||||
uses: codecov/codecov-action@v1
|
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: Installation
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y zfsutils-linux
|
||||||
|
truncate -s 100G /tmp/disk.img
|
||||||
|
sudo zpool create zfspv-pool `sudo losetup -f /tmp/disk.img --show`
|
||||||
|
|
||||||
|
- name: Set up Go 1.14
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.14.7
|
||||||
|
|
||||||
|
- name: Setup Minikube-Kubernetes
|
||||||
|
uses: manusa/actions-setup-minikube@v2.3.0
|
||||||
|
with:
|
||||||
|
minikube version: v1.16.0
|
||||||
|
kubernetes version: ${{ matrix.kubernetes }}
|
||||||
|
github token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setting environment variables
|
||||||
|
run: |
|
||||||
|
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
|
||||||
|
echo "OPENEBS_NAMESPACE=openebs" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build images locally
|
||||||
|
run: make zfs-driver-image || exit 1;
|
||||||
|
|
||||||
|
- name: bootstrap
|
||||||
|
run: make bootstrap
|
||||||
|
|
||||||
|
- name: Running tests
|
||||||
|
run: |
|
||||||
|
make ci
|
||||||
|
make sanity
|
||||||
|
|
||||||
csi-driver:
|
csi-driver:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ['lint', 'unit-test']
|
needs: ['lint', 'bdd-test']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
|
||||||
47
.github/workflows/pull_request.yml
vendored
47
.github/workflows/pull_request.yml
vendored
|
|
@ -52,10 +52,55 @@ jobs:
|
||||||
- name: Upload Coverage Report
|
- name: Upload Coverage Report
|
||||||
uses: codecov/codecov-action@v1
|
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: Installation
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y zfsutils-linux
|
||||||
|
truncate -s 100G /tmp/disk.img
|
||||||
|
sudo zpool create zfspv-pool `sudo losetup -f /tmp/disk.img --show`
|
||||||
|
|
||||||
|
- name: Set up Go 1.14
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.14.7
|
||||||
|
|
||||||
|
- name: Setup Minikube-Kubernetes
|
||||||
|
uses: manusa/actions-setup-minikube@v2.3.0
|
||||||
|
with:
|
||||||
|
minikube version: v1.16.0
|
||||||
|
kubernetes version: ${{ matrix.kubernetes }}
|
||||||
|
github token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setting environment variables
|
||||||
|
run: |
|
||||||
|
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
|
||||||
|
echo "OPENEBS_NAMESPACE=openebs" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build images locally
|
||||||
|
run: make zfs-driver-image || exit 1;
|
||||||
|
|
||||||
|
- name: bootstrap
|
||||||
|
run: make bootstrap
|
||||||
|
|
||||||
|
- name: Running tests
|
||||||
|
run: |
|
||||||
|
make ci
|
||||||
|
make sanity
|
||||||
|
|
||||||
csi-driver:
|
csi-driver:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ['lint', 'unit-test']
|
needs: ['lint', 'bdd-test']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
|
||||||
61
.travis.yml
61
.travis.yml
|
|
@ -1,61 +0,0 @@
|
||||||
sudo: required
|
|
||||||
dist: bionic
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- CHANGE_MINIKUBE_NONE_USER=true
|
|
||||||
- MINIKUBE_WANTUPDATENOTIFICATION=false
|
|
||||||
- MINIKUBE_WANTREPORTERRORPROMPT=false
|
|
||||||
- MINIKUBE_HOME=$HOME
|
|
||||||
- CHANGE_MINIKUBE_NONE_USER=true
|
|
||||||
- KUBECONFIG=$HOME/.kube/config
|
|
||||||
- OPENEBS_NAMESPACE=openebs
|
|
||||||
- NodeID=$HOSTNAME
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
language: go
|
|
||||||
go:
|
|
||||||
- 1.14.7
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
update: true
|
|
||||||
before_install:
|
|
||||||
- sudo apt-get update -qq
|
|
||||||
- sudo apt-get install -y zfsutils-linux
|
|
||||||
- truncate -s 100G /tmp/disk.img
|
|
||||||
- sudo zpool create zfspv-pool `sudo losetup -f /tmp/disk.img --show`
|
|
||||||
install:
|
|
||||||
- if [ "$TRAVIS_BUILD_DIR" != "$GOPATH/src/github.com/openebs/zfs-localpv" ]; then
|
|
||||||
mkdir -p $GOPATH/src/github.com/openebs/;
|
|
||||||
mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openebs;
|
|
||||||
cd $GOPATH/src/github.com/openebs/zfs-localpv;
|
|
||||||
fi
|
|
||||||
- make bootstrap
|
|
||||||
- make format
|
|
||||||
- make license-check
|
|
||||||
- make golint
|
|
||||||
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.17.4/bin/linux/amd64/kubectl
|
|
||||||
&& chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
|
||||||
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.8.1/minikube-linux-amd64
|
|
||||||
&& chmod +x minikube && sudo mv minikube /usr/local/bin/
|
|
||||||
- mkdir -p $HOME/.kube $HOME/.minikube
|
|
||||||
- touch $KUBECONFIG
|
|
||||||
- sudo minikube start --vm-driver=none --kubernetes-version=v1.17.4
|
|
||||||
- sudo chown -R $USER $HOME/.minikube
|
|
||||||
- sudo chown -R $USER $HOME/.kube
|
|
||||||
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}';
|
|
||||||
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
|
|
||||||
sleep 1; done
|
|
||||||
- kubectl cluster-info
|
|
||||||
before_script:
|
|
||||||
- "./buildscripts/travis-build.sh"
|
|
||||||
script:
|
|
||||||
- sudo -E env "PATH=$PATH" make ci || travis_terminate 1
|
|
||||||
- sudo -E env "PATH=$PATH" make sanity || travis_terminate 1
|
|
||||||
after_success:
|
|
||||||
- make deploy-images
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
recipients:
|
|
||||||
- pawan@openebs.io
|
|
||||||
1
changelogs/unreleased/293-shubham14bajpai
Normal file
1
changelogs/unreleased/293-shubham14bajpai
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
move the bdd test cases to github action
|
||||||
|
|
@ -54,7 +54,7 @@ EOT
|
||||||
|
|
||||||
sudo rm -rf /tmp/csi.sock
|
sudo rm -rf /tmp/csi.sock
|
||||||
CSI_TEST_REPO="https://github.com/$test_repo/csi-test.git"
|
CSI_TEST_REPO="https://github.com/$test_repo/csi-test.git"
|
||||||
CSI_REPO_PATH="$GOPATH/src/github.com/$test_repo/csi-test"
|
CSI_REPO_PATH="$(go env GOPATH)/src/github.com/$test_repo/csi-test"
|
||||||
if [ ! -d "$CSI_REPO_PATH" ] ; then
|
if [ ! -d "$CSI_REPO_PATH" ] ; then
|
||||||
git clone -b "v4.0.1" "$CSI_TEST_REPO" "$CSI_REPO_PATH"
|
git clone -b "v4.0.1" "$CSI_TEST_REPO" "$CSI_REPO_PATH"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue