fix(linux): 🐛 source distro information from /etc/os-release for … #380
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
name: Test | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install build dependencies | |
id: install_packages | |
run: > | |
sudo apt-get update && sudo apt-get -y install | |
desktop-file-utils gcc | |
libgl1-mesa-dev xserver-xorg-dev | |
libxcursor-dev libxrandr-dev | |
libxinerama-dev libxi-dev | |
libgl1-mesa-dev libxxf86vm-dev | |
> ${RUNNER_TEMP}/dpkg.log | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- 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 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 | |
id: upload_coverage | |
uses: codecov/codecov-action@v4 | |
continue-on-error: true | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
file: ./coverage.txt | |
fail_ci_if_error: false | |
nilaway: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Nil panic checks | |
uses: qbaware/nilaway-action@v0 | |
with: | |
package-to-scan: . |