goapp refactoring #8
This file contains hidden or 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 workflow will build a golang project V4 | |
| # Builds a Fyne app on macOS, Linux & Windows forcing Bash shell on all of them. | |
| # Specify Go v1.21 or better so that Windows linker doesn't crap out! | |
| #  | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ['1.24', 'stable'] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| go-version-file: 'go.mod' | |
| - name: Install dependencies | |
| run: >- | |
| sudo apt-get update && | |
| sudo apt-get install | |
| bc | |
| gcc | |
| libgl1-mesa-dev | |
| libwayland-dev | |
| libx11-dev | |
| libxkbcommon-dev | |
| xorg-dev | |
| if: ${{ runner.os == 'Linux' }} | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| shell: bash | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| GITHUBLOS=true go test -v -coverprofile=profile.cov ./... | |
| elif [ "$RUNNER_OS" == "Windows" ]; then | |
| export GITHUBLOS=true && go test -v -coverprofile=profile.cov ./... | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| GITHUBLOS=true go test -v -coverprofile=profile.cov ./... | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| - name: Send coverage | |
| uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| path-to-profile: profile.cov | |