diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5ff51ca --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go +--- +name: Go + +on: + push: + pull_request: + +jobs: + build: + strategy: + matrix: + go-version: ['1.21.x', '1.22.x'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Test + run: go test -v ./... diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..3f03963 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,52 @@ +--- +name: golangci-lint +on: + push: + pull_request: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + - name: golangci-lint + uses: golangci/golangci-lint-action@v5 + with: + # Require: The version of golangci-lint to use. + # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. + # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. + version: v1.57 + + # Optional: working directory, useful for monorepos + # working-directory: somedir + + # Optional: golangci-lint command line arguments. + # + # Note: By default, the `.golangci.yml` file should be at the root of the repository. + # The location of the configuration file can be changed by using `--config=` + # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 + + # Optional: Show only new issues. + # If you are using `merge_group` event (merge queue) you should add the option `fetch-depth: 0` to `actions/checkout` step. + # The default value is `false`. + # only-new-issues: true + + # Optional: if set to true, then all caching functionality will be completely disabled, + # takes precedence over all other caching options. + # skip-cache: true + + # Optional: if set to true, caches will not be saved, but they may still be restored, + # subject to other options + # skip-save-cache: true + + # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. + # install-mode: "goinstall" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fcbfffd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: - - 1.8 - - 1.9 - -script: - - go test -v ./... diff --git a/README.md b/README.md index 158b801..48c4a4e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ -[![Build Status](https://travis-ci.org/piotaixr/zfs-snapback.svg?branch=master)](https://travis-ci.org/piotaixr/zfs-snapback) + + # zfs-snapback + Small utility in Go to synchronize snapshots recursively from a source to a destination. Both source and destination can be a remote or local file system. +[![Build Status](https://github.com/digineo/zfs-snapback/workflows/go/badge.svg?branch=main)](https://github.com/digineo/zfs-snapback/actions) + # Usage Note that - the given FS should already be present on the destination.