Merge pull request #117 from gr-oss-devops/633-geras-github-deprecati… #65
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: Test | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Check formatting | |
run: | | |
files=$(gofmt -l .) | |
if [[ $files != "" ]]; then | |
echo "Files need gofmt run on them:" | |
echo "$files" | |
exit 1 | |
fi | |
- name: Build binary | |
run: | | |
go build ./cmd/... | |
- name: Check flags are documented | |
run: | | |
./test/flags-doc.sh | |
- name: Run tests | |
run: | | |
go test ./... |