Didn't run for some reasons; something with the actions cache:
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/
b9a1abd7-273e-449f-b255-
5e8e947b3f97/cache.tzst -P -C /home/runner/work/fsnotify/fsnotify
Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-
20220412211240-
33da011f77ad/windows/race0.go: Cannot open: File exists
Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-
20220412211240-
33da011f77ad/windows/types_windows.go: Cannot open: File exists
Replace it with staticcheck; which is nicer anyway.
-name: build
-on:
- push:
- pull_request:
+name: 'build'
+on: ['push', 'pull_request']
jobs:
- cross-compile-supported:
+ cross-compile:
strategy:
fail-fast: false
matrix:
- go:
- - '1.16'
- - '1.18'
+ go: ['1.16', '1.18']
runs-on: ubuntu-latest
steps:
- name: setup Go
+++ /dev/null
-name: test
-on:
- push:
- pull_request:
-jobs:
- lint:
- runs-on: ubuntu-latest
- steps:
- - name: setup Go
- uses: actions/setup-go@v3
- with:
- go-version: '1.18'
-
- - name: checkout
- uses: actions/checkout@v3
-
- - name: gofmt
- run: |
- test -z "$(gofmt -s -d . | tee /dev/stderr)"
-
- - name: vet
- run: |
- go vet ./...
-
- - name: golangci-lint
- uses: golangci/golangci-lint-action@v3
- continue-on-error: true
- with:
- version: latest
- skip-go-installation: true
--- /dev/null
+name: 'staticcheck'
+on: ['push', 'pull_request']
+jobs:
+ staticcheck:
+ name: 'staticcheck'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ - uses: dominikh/staticcheck-action@v1.2.0
+ with:
+ version: '2022.1'
-name: test
-on:
- push:
- pull_request:
+name: 'test'
+on: ['push', 'pull_request']
jobs:
test:
strategy:
-name: vagrant
-on:
- push:
- pull_request:
+name: 'test'
+on: ['push', 'pull_request']
jobs:
test:
strategy:
}
h.Close()
select {
- case _ = <-w.Events:
+ case <-w.Events:
case err := <-w.Errors:
t.Fatalf("Error from watcher: %v", err)
case <-time.After(50 * time.Millisecond):
// Now we try to swap the file descriptor under its nose.
w.Close()
w, err = NewWatcher()
- defer w.Close()
+ defer func() { _ = w.Close() }()
if err != nil {
t.Fatalf("Failed to create second watcher: %v", err)
}
if err != nil {
t.Fatalf("Failed to remove testFile: %v", err)
}
- _ = <-w.Events // consume Remove event
+ <-w.Events // consume Remove event
<-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated
func() {