36 lines
610 B
YAML
36 lines
610 B
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Show environment
|
|
run: |
|
|
echo "=== Workspace ==="
|
|
pwd
|
|
ls -la
|
|
|
|
echo
|
|
echo "=== Environment Variables ==="
|
|
env | sort
|
|
|
|
- name: Clone repository
|
|
run: |
|
|
git clone "$CI_REPOSITORY_URL" repo
|
|
ls -la repo
|
|
|
|
- name: Download dependencies
|
|
run: |
|
|
cd repo
|
|
go mod download
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd repo
|
|
go test ./... -v |