Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed May 1, 2024
1 parent 69514f1 commit 05ae580
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 87 deletions.
5 changes: 0 additions & 5 deletions .editorconfig

This file was deleted.

70 changes: 26 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,37 @@
name: test
on: [push]
name: 'test'
on: ['push', 'pull_request']
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- macos-10.15
- macos-latest
go:
- '1.18.0-beta1'
- '1.17'
- '1.16'
os: ['macos-12', 'macos-latest']
go: ['1.17', '1.22']
runs-on: ${{ matrix.os }}
steps:
- name: setup Go
uses: actions/setup-go@v2
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
stable: 'false'
go-version: ${{ matrix.go }}
go-version: '${{ matrix.go }}'
- name: 'test'
run: 'go test --race ./...'

- name: checkout
uses: actions/checkout@v2

- name: test
run: |
go test --race ./...
lint:
runs-on: macos-latest
staticcheck:
name: 'staticcheck'
runs-on: 'macos-latest'
steps:
- name: setup Go
uses: actions/setup-go@v2
with:
go-version: '1.17'

- name: checkout
uses: actions/checkout@v2

- name: gofmt
run: |
test -z "$(gofmt -s -d . | tee /dev/stderr)"
- name: vet
run: |
go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
continue-on-error: true
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
version: latest
skip-go-installation: true

go-version: '1.22'
- uses: 'actions/cache@v4'
with:
key: '${{ runner.os }}-staticcheck'
path: |
${{ runner.temp }}/staticcheck
${{ steps.install_go.outputs.GOCACHE || '' }}
- run: |
export STATICCHECK_CACHE="${{ runner.temp }}/staticcheck"
go install honnef.co/go/tools/cmd/staticcheck@latest
$(go env GOPATH)/bin/staticcheck ./...
22 changes: 0 additions & 22 deletions AUTHORS

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 The fsevents Authors. All rights reserved.
Copyright © The fsevents Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down
1 change: 0 additions & 1 deletion example/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build darwin
// +build darwin

package main

Expand Down
21 changes: 10 additions & 11 deletions fsevents.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build darwin
// +build darwin

// Package fsevents provides file system notifications on macOS.
package fsevents
Expand All @@ -16,7 +15,7 @@ type Event struct {
// to its device's root.
// Use DeviceForPath to determine the absolute path that's
// being referred to.
Path string
Path string

// Flags holds details what has happened.
Flags EventFlags
Expand All @@ -33,7 +32,7 @@ type Event struct {
// and resume processing them later from a newly-created
// EventStream, this is the value you would pass for the
// EventStream.EventID along with Resume=true.
ID uint64
ID uint64
}

// DeviceForPath returns the device ID for the specified volume.
Expand All @@ -49,10 +48,10 @@ func DeviceForPath(path string) (int32, error) {
// You can provide your own event channel if you wish (or one will be
// created on Start).
//
// es := &EventStream{Paths: []string{"/tmp"}, Flags: 0}
// es.Start()
// es.Stop()
// ...
// es := &EventStream{Paths: []string{"/tmp"}, Flags: 0}
// es.Start()
// es.Stop()
// ...
type EventStream struct {
stream fsEventStreamRef
rlref cfRunLoopRef
Expand All @@ -62,19 +61,19 @@ type EventStream struct {

// Events holds the channel on which events will be sent.
// It's initialized by EventStream.Start if nil.
Events chan []Event
Events chan []Event

// Paths holds the set of paths to watch, each
// specifying the root of a filesystem hierarchy to be
// watched for modifications.
Paths []string
Paths []string

// Flags specifies what events to receive on the stream.
Flags CreateFlags
Flags CreateFlags

// Resume specifies that watching should resume from the event
// specified by EventID.
Resume bool
Resume bool

// EventID holds the most recent event ID.
//
Expand Down
1 change: 0 additions & 1 deletion fsevents_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build darwin
// +build darwin

package fsevents

Expand Down
1 change: 0 additions & 1 deletion wrap.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build darwin
// +build darwin

package fsevents

Expand Down
1 change: 0 additions & 1 deletion wrap_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build darwin
// +build darwin

package fsevents

Expand Down

0 comments on commit 05ae580

Please sign in to comment.