From da49b9ee5f87fc3183cfed4ae3d475c68d2a09e4 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 19 Nov 2024 12:30:37 +0100 Subject: [PATCH] Introduce github actions --- .github/release-drafter.yml | 30 ++++++++++++++ .github/workflows/release-drafter.yaml | 15 +++++++ .github/workflows/test.yaml | 56 ++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..59bc948 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,30 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' + +template: | + ## General Changes + + $CHANGES + +categories: +- title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' +- title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: patch diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml new file mode 100644 index 0000000..f0e8eae --- /dev/null +++ b/.github/workflows/release-drafter.yaml @@ -0,0 +1,15 @@ +--- +name: Release Drafter Action + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..eb89fcb --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,56 @@ +--- +name: Test +on: + pull_request: + branches: + - master + release: + types: + - published + push: + branches: + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + test: + name: Docker Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: false + + # - name: Lint + # uses: golangci/golangci-lint-action@v6 + # with: + # args: --build-tags integration -p bugs -p unused -D protogetter --timeout=5m + + - name: Run unit tests + run: | + make test + + + # integration: + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + + # - name: Setup Go + # uses: actions/setup-go@v5 + # with: + # go-version-file: 'go.mod' + + # - name: Run integration tests + # run: | + # make integration