33 lines
552 B
YAML
33 lines
552 B
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
run: |
|
|
git clone \
|
|
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \
|
|
.
|
|
|
|
git checkout "${GITHUB_SHA}"
|
|
|
|
- name: Verify checkout
|
|
run: |
|
|
pwd
|
|
ls -la
|
|
test -f go.mod
|
|
|
|
- name: Download dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: Run tests
|
|
run: |
|
|
go test ./... -v |