FileHelper.NewWriter should truncate file if it already exists (#22) #33
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
# A basic workflow for Go | |
name: test-go | |
on: [push] | |
defaults: | |
run: | |
shell: bash -ieo pipefail {0} | |
jobs: | |
test: | |
name: golang test & build | |
runs-on: [ubuntu-20.04] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
# TODO: We should try to speed this up by caching dependencies | |
# https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs | |
with: | |
go-version: '1.19.2' # The Go version to download (if necessary) and use. | |
- name: test | |
run: go test ./... | |
- name: build | |
run: go build ./cli/... | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
# https://github.com/golangci/golangci-lint/releases | |
version: v1.50 | |
# These options work around the errors in this issue | |
# https://github.com/golangci/golangci-lint-action/issues/244 | |
skip-pkg-cache: true | |
skip-build-cache: true |