-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (40 loc) · 1.11 KB
/
check.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Based upon:
# https://github.com/actions/starter-workflows/blob/main/ci/go.yml
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.18, 1.19]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Download Packages
run: go get -t -v
- name: Format
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Vet
run: go vet
- name: Build
run: |
mkdir bin
go build -v -o bin
- name: Test
run: |
echo "provider_installation { dev_overrides { \"github.com/ably/ably\" = \"$PWD/bin\", } direct {} }" > ~/.terraformrc
TF_ACC=1 go test -v ./...
env:
ABLY_ACCOUNT_TOKEN: ${{ secrets.ABLY_ACCOUNT_TOKEN }}
ABLY_URL: 'https://staging-control.ably-dev.net/v1'