forked from hashicorp/terraform-ls
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (30 loc) · 845 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: test
on:
pull_request:
push:
branches: [main]
env:
GOPROXY: https://proxy.golang.org/
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: .go-version
- name: Go mod download
run: go mod download -x
- name: Go mod verify
run: go mod verify
- name: Run go fmt
run: go run github.com/mh-cbon/go-fmt-fail ./...
- name: Run tests
run: go test -cover -covermode=atomic -timeout=5m -race ./...