-
-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (35 loc) · 958 Bytes
/
go.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
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
environment: CI
defaults:
run:
working-directory: ${{ github.workspace }}
strategy:
matrix:
go-version: [1.18.x, 1.20.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Setup Credentials
shell: bash
env:
GSHEET_GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GSHEET_GOOGLE_APPLICATION_CREDENTIALS }}
run: |
echo "$GSHEET_GOOGLE_APPLICATION_CREDENTIALS" > creds.json
- name: Test
shell: bash
run: |
export GOOGLE_APPLICATION_CREDENTIALS=$(python -c 'import os, sys; print(os.path.realpath("creds.json"))')
go test -v ./...