Skip to content

Develop

Develop #259

Workflow file for this run

name: build and test
on:
push:
branches:
- master
pull_request:
branches:
- master
- develop
permissions:
contents: read
jobs:
buildandtest:
name: Build and Test on Go ${{matrix.go}}
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21', '1.20' ]
steps:
- run: |
sudo docker version
sudo docker -H unix:///proc/1/root/run/docker.sock version
- name: Set up Go ${{matrix.go}}
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # pin@v4
with:
go-version: ${{matrix.go}}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3
- name: Get dependencies
run: go get -v -t -d ./...
- name: Test Go packages as root
run: go test -v -p 1 -exec sudo ./...
- name: Test Go packages as ordinary user
run: go test -v -p 1 ./...