Skip to content

Commit

Permalink
ci: add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed May 15, 2024
1 parent f87b8c8 commit 0f8ec1f
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: verify

on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
name: Build & Test

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-go@v5
with:
go-version: ~1.22
cache: true

- name: go version
run: |
go version
- name: build
run: |
make
- name: verify that generated code is up-to-date
run: |
# make (which we ran in the previous step) will implicitly also run the targets manifests & generate, which
# could potentially modify code that is under version control, if changes have been comitted that would have
# required updating manifests or generated code and these updates have not been done.
git diff --exit-code
- name: lint
run: |
make lint
- name: test
run: |
make test
- name: build container image
run: |
# Instead of running make docker-build, we run docker build directly.
docker build -t dash0-operator-controller:latest .
# TODO look into https://github.com/helm/kind-action and run e2e test in GH action
# - name: end-to-end test
# run: |
# make test-e2e

0 comments on commit 0f8ec1f

Please sign in to comment.