Merge pull request #31 from credativ/golang-1.21.3 #96
Workflow file for this run
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: Unit tests | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
pull_request: | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.3 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y make protobuf-compiler libsystemd-dev curl | |
- name: Install Go dependencies | |
run: | | |
go install github.com/golang/protobuf/protoc-gen-go@v1.3.0 | |
go install github.com/gogo/protobuf/protoc-gen-gogoslick@v1.2.1 | |
go install github.com/fatih/faillint@v1.11.0 | |
- name: Test | |
run: make BUILD_IN_CONTAINER=false test | |
- name: Install golangci-lint | |
run: | | |
cd / | |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | |
| sudo sh -s v1.52.0 | |
- name: Run Linter | |
run: make lint |