fix: reading root directory when empty #3
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
name: Pull Request Workflow | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
checks: | |
name: Workspace Checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20' | |
- name: Lint | |
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
- name: Tidy | |
run: | | |
go mod tidy | |
if [[ -n $(git status -s) ]]; then exit 1; fi | |
- name: Vet | |
run: go vet ./... | |
- name: Test | |
run: go test ./... |