-
Notifications
You must be signed in to change notification settings - Fork 277
68 lines (58 loc) · 1.66 KB
/
ci.yml
File metadata and controls
68 lines (58 loc) · 1.66 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Continuous integration
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go: [1.16.x, 1.15.x, 1.14.x, 1.13.x]
name: Go ${{ matrix.go }} tests @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get update
sudo apt-get install -yq librocksdb-dev
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'macos-')
run: |
brew update
brew install rocksdb
- name: Install Golang ${{ matrix.go }}
id: install-golang
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Golang modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test v5
if: startsWith(matrix.os, 'ubuntu-')
run: go test -v
- name: Test v6.16 or later
if: startsWith(matrix.os, 'macos-')
run: go test -v -tags rocksdb_6_16
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -yq librocksdb-dev
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest