-
Notifications
You must be signed in to change notification settings - Fork 37
37 lines (36 loc) · 903 Bytes
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
build_test:
name: Build and Test
strategy:
matrix:
go: ['1.15', '1.16', '1.17']
runs-on: ubuntu-latest
services:
elasticsearch:
image: elasticsearch:2.4
ports:
- 9200:9200
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: ${{ matrix.go }}
stable: false
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ubuntu-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
ubuntu-go-
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y gcc git-core
env:
DEBIAN_FRONTEND: noninteractive
- name: Install juju-db
run: sudo snap install juju-db
- name: Build and Test
run: go test -mod readonly ./...