From bde4b702427f488e61d21e6cd7d856dd75fdfefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Thu, 5 Jan 2023 11:26:32 +0100 Subject: [PATCH] .github: Add CI pipeline --- .github/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/ci.yml diff --git a/.github/ci.yml b/.github/ci.yml new file mode 100644 index 00000000..d1e941ba --- /dev/null +++ b/.github/ci.yml @@ -0,0 +1,66 @@ +name: continuous-integration + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + GO_VERSION: "~1.19.4" + +jobs: + # Runs Golangci-lint on the source code + ci-go-lint: + name: ci-go-lint + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + + # Executes Unit Tests + ci-unit-tests: + name: ci-unit-tests + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Run unit tests + run: | + make test + + # Builds mark binary + ci-build: + name: ci-build + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Build mark + run: | + make build