Skip to content

Commit

Permalink
Add running tests on macos
Browse files Browse the repository at this point in the history
It needs because I got bug in go-fuse that specific for macos after autoupdate go-fuse version via dependabot, so it should prevent this bugs in future
  • Loading branch information
dsxack committed Nov 10, 2023
1 parent a63bc15 commit 77d6aaa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: goreleaser
name: Release

on:
push:
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go package
name: Go tests

on:
push:
Expand All @@ -7,15 +7,16 @@ on:
branches:
- master
- main

pull_request:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ '1.21', 'stable' ]
name: Go ${{ matrix.go }}
os: [ ubuntu-latest, macos-latest ]
name: Go ${{ matrix.go }} ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

Expand All @@ -26,14 +27,24 @@ jobs:

- name: Install dependencies
run: |
sudo apt install fuse
if [ "$RUNNER_OS" = "Linux" ]
then
sudo apt-get update
sudo apt-get install -y fuse
fi
if [ "$RUNNER_OS" = "macOS" ]
then
brew install --cask macfuse
fi
- name: Build
run: go build -v ./...
run: |
which go
go build -v ./...
- name: Test
run: |
go test `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic
go test -timeout 1m `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: golangci-lint
name: Lint
on:
push:
tags:
Expand Down

0 comments on commit 77d6aaa

Please sign in to comment.