Add missing RBAC and error handler for secret update #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Tests | |
on: [pull_request] | |
jobs: | |
lint: | |
name: "Linters (go v${{ matrix.go-version }})" | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
go-version: [ '1.20' ] | |
steps: | |
- name: Checkout k8s-secret-replicator | |
uses: actions/checkout@v3 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check formatting | |
run: | | |
test -z $(gofmt -l -s ./) | |
- name: Check go vet | |
run: | | |
go vet ./... | |
- name: Verify dependencies | |
run: | | |
go mod verify | |
- name: Check if plugin can be built | |
run: | | |
go build -v . | |
unit-test: | |
name: "Unit tests (go v${{ matrix.go-version }})" | |
needs: lint | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
go-version: [ '1.20' ] | |
steps: | |
- name: Checkout k8s-secret-replicator | |
uses: actions/checkout@v3 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run unit tests | |
run: | | |
go test -v ./... |