Skip to content

Merge pull request #234 from umangachapagain/csv-capabilities #1249

Merge pull request #234 from umangachapagain/csv-capabilities

Merge pull request #234 from umangachapagain/csv-capabilities #1249

name: Tests & Builds
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
defaults:
run:
shell: bash
jobs:
clean-workdir:
name: Ensure Clean Workdir
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Scan for uncommitted changes
run: make ensure-clean-workdir
unit-test:
name: Unit Tests
needs: clean-workdir
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Run unit tests
run: make unit-test
integration-test:
name: Integration Tests
needs: clean-workdir
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Run integration tests
run: make test
build-operator:
name: Build Operator Image
needs: [unit-test,integration-test]
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: make operator-build
validate-bundle:
name: Validate Operator Bundle
needs: clean-workdir
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Validate
run: make bundle
build-bundle:
name: Build Bundle Image
needs: validate-bundle
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: make bundle-build