Skip to content

fix: check if db still exists where needed (#10) #31

fix: check if db still exists where needed (#10)

fix: check if db still exists where needed (#10) #31

Workflow file for this run

name: Go Test
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Start containers
run: docker-compose up -d
- name: Test adapters on ${{ matrix.os }}
env:
GO111MODULE: on
run: |
go test -v -race ./adapters/...
- name: Stop containers
if: always()
run: docker-compose down
check-manifests:
name: Check if latest manifests have been generated
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.17.x
id: go
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Test manifest for un-commited changes
run: |
export IMG="anbraten/external-database-operator:0.0.1"
make generate-manifests
! git status -u | grep deploy/external-database-controller.yml
test-build:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.17.x
id: go
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build container images
run: |
export IMG="anbraten/external-database-operator:0.0.1"
make build
make docker-build