Skip to content

rm depguard

rm depguard #170

Workflow file for this run

# This workflow runs all of our lints, tests, and other requirements for merging code.
name: Validate
on: [push, pull_request]
jobs:
validate:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [oldstable, stable]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v3
- name: Format
run: test -z $(gofmt -l -w -s ./)
- name: Lint
uses: golangci/golangci-lint-action@v3.5.0
- name: Test
run: go test -v -race -cover -coverprofile=coverage.txt ./... | tee -a test-results.txt
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results.txt
- name: Upload Coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage.txt
- name: Enforce 100% Test Coverage
run: |
if ! grep -q "coverage: 100.0% of statements" test-results.txt; then
echo "::error::Test Coverage is not 100%"
exit 1
fi
- name: Benchmark
run: |
for i in {1..5}; do
go test -run=XXX -bench=. | tee -a bench.txt
done
- name: Upload Benchmark
uses: actions/upload-artifact@v3
with:
name: bench-${{ matrix.os }}-${{ matrix.go-version }}
path: bench.txt