mark/.github/ci.yml
2023-01-05 11:26:50 +01:00

67 lines
1.3 KiB
YAML

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