Skip to content

Add workflow for static analysis (go vet, gofmt, staticcheck) #149

Add workflow for static analysis (go vet, gofmt, staticcheck)

Add workflow for static analysis (go vet, gofmt, staticcheck) #149

Workflow file for this run

name: Check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Downgrade MinGW
if: matrix.os == 'windows-latest'
run: choco install mingw --version 11.2.0.07112021 --allow-downgrade
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Download deps
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update && sudo apt-get install -y libpango1.0-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpng-dev libgl1-mesa-dev libglu1-mesa-dev
fi
shell: bash
- name: Build
run: go build -v ./...