-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fyne-io:master' into diagramwidget
- Loading branch information
Showing
6 changed files
with
114 additions
and
62 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
name: Platform Tests | ||
on: [push, pull_request] | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
platform_tests: | ||
|
@@ -11,32 +13,26 @@ jobs: | |
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: WillAbides/[email protected] | ||
id: setup-go-faster | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: WillAbides/[email protected] | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Get dependencies | ||
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev bc | ||
run: >- | ||
sudo apt-get update && | ||
sudo apt-get install | ||
bc | ||
gcc | ||
libgl1-mesa-dev | ||
libwayland-dev | ||
libx11-dev | ||
libxkbcommon-dev | ||
xorg-dev | ||
xvfb | ||
if: ${{ runner.os == 'Linux' }} | ||
|
||
- name: Tests | ||
run: go test -tags ci ./... | ||
|
||
- name: Update coverage | ||
run: | | ||
GO111MODULE=off go get github.com/mattn/goveralls | ||
set -e | ||
go test -tags ci -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 < 48" | bc) )) ; then echo "Test coverage lowered"; exit 1; fi | ||
if: ${{ runner.os == 'Linux' }} | ||
|
||
- name: Update PR Coverage | ||
uses: shogo82148/actions-goveralls@v1 | ||
env: | ||
GOROOT: ${{steps.setup-go-faster.outputs.GOROOT}} | ||
with: | ||
path-to-profile: coverage.out | ||
if: ${{ runner.os == 'Linux' && matrix.go-version == '1.17.x' && github.event_name == 'push' }} | ||
run: go test "-test.benchtime" 10ms -tags ci ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,61 @@ | ||
name: Static Analysis | ||
on: [push, pull_request] | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
checks: | ||
static_analysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: WillAbides/[email protected] | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: WillAbides/[email protected] | ||
with: | ||
go-version: '1.17.x' | ||
go-version: '1.21.x' | ||
|
||
- name: Get dependencies | ||
run: >- | ||
sudo apt-get update && | ||
sudo apt-get install | ||
gcc | ||
libegl1-mesa-dev | ||
libgl1-mesa-dev | ||
libgles2-mesa-dev | ||
libx11-dev | ||
xorg-dev | ||
xvfb | ||
- name: Install analysis tools | ||
run: | | ||
sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | ||
go install golang.org/x/lint/golint@latest | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
- name: Cleanup repository | ||
run: rm -rf vendor/ | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
go install github.com/mattn/goveralls@latest | ||
- name: Vet | ||
run: go vet -tags ci ./... | ||
run: go vet ./... | ||
|
||
- name: Goimports | ||
run: test -z $(goimports -e -d . | tee /dev/stderr) | ||
run: test -z "$(goimports -e -d . | tee /dev/stderr)" | ||
|
||
- name: Gocyclo | ||
run: gocyclo -over 30 . | ||
|
||
- name: Golint | ||
run: golint -set_exit_status $(go list -tags ci ./...) | ||
|
||
- name: Staticcheck | ||
run: staticcheck -go 1.14 ./... | ||
run: staticcheck ./... | ||
|
||
- 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 < 48" | bc) )); then echo "Test coverage lowered"; exit 1; fi | ||
- name: Update PR Coverage | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out |
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
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
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
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