Skip to content

Fix dpkg lock on CI actions #50

Fix dpkg lock on CI actions

Fix dpkg lock on CI actions #50

Workflow file for this run

name: PR
on:
workflow_dispatch: {}
pull_request:
branches:
- main
paths:
- "!docs/**"
- "!archive/**"
- "!custom-archive/**"
- "!tools/bin/**"
- "!**.yaml"
- "!**.md"
- "!**.txt"
- "!**.conf"
# override previous rules:
- "**.c"
- "**.h"
- "**.go"
- "**.sh"
- ".github/workflows/pr.yaml"
concurrency:
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
#
# CODE VERIFICATION
#
verify-analyze-code:
name: Build and Test
env:
HOME: "/tmp/root"
GOPATH: "/tmp/go"
GOCACHE: "/tmp/go-cache"
GOROOT: "/usr/local/go"
runs-on: ubuntu-latest
steps:
#
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
#
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
with:
from: pr
#
- name: Install staticchecker
run: |
go install honnef.co/go/tools/cmd/staticcheck@a093f7c2d3d45d5104fb3414ae939a98be37be02 # v0.4.7
cp $GOPATH/bin/staticcheck /usr/bin/
shell: bash
#
- name: Install goimports-reviser
run: |
go install github.com/incu6us/goimports-reviser/v3@38044e6cb02749195e5384d9d9535ed00a10fc1f # v3.6.4
cp $GOPATH/bin/goimports-reviser /usr/bin/
shell: bash
#
- name: Lint
run: |
if test -z "$(gofmt -l .)"; then
echo "Congrats! There is nothing to fix."
else
echo "The following lines should be fixed."
gofmt -s -d .
exit 1
fi
#
- name: Check Golang Vet
run: |
make check-vet
#
- name: Check with StaticCheck
run: |
make check-staticcheck
#
- name: Run Unit Tests
run: |
make test-unit