-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (38 loc) · 1.01 KB
/
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
on: [push, pull_request]
name: Test and Release
jobs:
unit_tests:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '>= 1.20'
- name: Checkout code
uses: actions/checkout@v2
- name: Unpack test GCP service account
env:
OTARU_GITHUB_CI: ${{ secrets.OTARU_GITHUB_CI }}
run: |
echo -n $OTARU_GITHUB_CI | base64 -d > /tmp/otaru-github-ci.json
- name: Test
run: go test ./...
env:
SKIP_FUSE_TEST: "1"
GOOGLE_APPLICATION_CREDENTIALS: "/tmp/otaru-github-ci.json"
release_docker:
needs: [unit_tests]
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '>= 1.20'
- name: Checkout
uses: actions/checkout@v2
- uses: imjasonh/[email protected]
- run: ko publish --bare ./cmd/otaru