forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.21 KB
/
db-tests.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
name: db-tests
on:
pull_request:
paths:
- "tm2/pkg/db/**.go"
- "go.sum"
- ".github/workflows/db-tests.yml"
push:
branches: [ "master" ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
go-version: [ "1.19.x", "1.20.x" ]
tags:
- cleveldb
- memdb
- fsdb
- boltdb
steps:
# golang
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
# leveldb
- name: install leveldb
if: ${{ matrix.tags=='cleveldb' }}
run: |
sudo apt-get install libsnappy1v5
mkdir -p /tmp/leveldb
cd /tmp/leveldb
wget http://ftp.us.debian.org/debian/pool/main/l/leveldb/libleveldb1d_1.22-3_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/l/leveldb/libleveldb-dev_1.22-3_amd64.deb
sudo dpkg -i *.deb
# test ./pkgs/db
- uses: actions/checkout@v3
- name: test ./tm2/pkg/db
run: go test -tags ${{ matrix.tags }} ./tm2/pkg/db/...