Skip to content

Working on Fyne for tamago / noos #8265

Working on Fyne for tamago / noos

Working on Fyne for tamago / noos #8265

Workflow file for this run

name: Static Analysis
on: [push, pull_request]
permissions:
contents: read
env:
CC: "clang"
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Get dependencies
run: |
sudo apt-get update
sudo apt-get install clang libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev xvfb language-pack-en
- name: Set environment variable LANG
run: export LANG=en_EN.UTF-8
- name: Install analysis tools
run: |
go install mvdan.cc/gofumpt@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/mattn/goveralls@latest
go install lucor.dev/lian@latest
- name: Vet
run: go vet ./...
- name: Formatting
run: |
gofumpt -d -e .
test -z "$(goimports -e -d . | tee /dev/stderr)"
- name: Gocyclo
run: gocyclo -over 30 .
- name: Staticcheck
run: staticcheck ./...
- name: Check license of dependencies
run: lian -d --allowed="Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, ISC"
- name: Update coverage
run: |
set -e
xvfb-run go test -covermode=atomic -coverprofile=coverage.out ./...
coverage=`go tool cover -func coverage.out | grep total | tr -s '\t' | cut -f 3 | grep -o '[^%]*'`
if (( $(echo "$coverage < 62" | bc) )); then echo "Test coverage lowered"; exit 1; fi
- name: Update PR Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out