Skip to content

build(github): 👷 combine build and test workflows… #126

build(github): 👷 combine build and test workflows…

build(github): 👷 combine build and test workflows… #126

Workflow file for this run

name: Run go tests
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install/Cache dependencies
id: cache_pkg_deps
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: desktop-file-utils gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev dbus-x11
- name: Set up Go
id: setup_go
uses: actions/setup-go@v5
with:
go-version: '^1.22'
- name: Install Go dependencies
id: install_go_deps
run: |
go install golang.org/x/tools/cmd/stringer@latest
go install github.com/fyne-io/fyne-cross@latest
go install golang.org/x/text/cmd/gotext@latest
go install github.com/matryer/moq@latest
- name: Run go generate
id: go_generate
run: go generate -v ./...
- name: Run go build
id: go_build
run: go build -v ./...
- name: Run go test
id: go_test
run: go test -v -coverprofile=coverage.txt ./...
continue-on-error: true
- name: Upload Coverage
uses: codecov/codecov-action@v4
continue-on-error: true
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
fail_ci_if_error: false