Skip to content

Improved determination on whether to use disk auto-expansion. #49

Improved determination on whether to use disk auto-expansion.

Improved determination on whether to use disk auto-expansion. #49

name: Run Tests
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Install dependencies
run: go get .
- name: Build OS X Binary
run: GOOS=darwin GOARCH=amd64 go build -o cbdinocluster-darwin
- name: Build Linux Binary
run: GOOS=linux GOARCH=amd64 go build -o cbdinocluster-linux
- name: Build Windows Binary
run: GOOS=windows GOARCH=amd64 go build -o cbdinocluster-windows.exe
- uses: actions/upload-artifact@v3
with:
name: cbdinocluster-darwin
path: cbdinocluster-darwin
- uses: actions/upload-artifact@v3
with:
name: cbdinocluster-linux
path: cbdinocluster-linux
- uses: actions/upload-artifact@v3
with:
name: cbdinocluster-windows.exe
path: cbdinocluster-windows.exe
test:
name: Integration Test
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: cbdinocluster-linux
- run: |
chmod +x cbdinocluster-linux
./cbdinocluster-linux init --auto
- name: Setup Cluster
run: |
CBDC_ID=$(./cbdinocluster-linux allocate simple:7.0.0)
echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV"
- name: Run Tests
timeout-minutes: 10
run: |
./cbdinocluster-linux connstr $CBDC_ID
CBDC_MGMT=$(./cbdinocluster-linux mgmt $CBDC_ID)
echo $CBDC_MGMT
curl $CBDC_MGMT
- name: Cleanup Cluster
if: always()
run: |
./cbdinocluster-linux rm $CBDC_ID