fix: resolve Docusaurus build (#1351) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
goversion: | |
- "1.20.x" | |
- "1.21.x" | |
tags: | |
- cleveldb | |
- memdb | |
- fsdb | |
- boltdb | |
steps: | |
- uses: actions/checkout@v4 | |
# golang | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.goversion }} | |
# 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 | |
- name: test ./tm2/pkg/db | |
run: go test -tags ${{ matrix.tags }} ./tm2/pkg/db/... |