2021-03-29 23:17:19 +00:00
|
|
|
name: Continuous integration
|
|
|
|
on: [ push ]
|
|
|
|
jobs:
|
2021-03-30 16:16:07 +00:00
|
|
|
tests:
|
2021-03-29 23:17:19 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest, macos-latest ]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.16.x
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
|
|
|
sudo apt update && sudo apt install build-essential
|
|
|
|
fi
|
|
|
|
shell: bash
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Build
|
|
|
|
run: make all
|
|
|
|
- name: Lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: "--build-tags=mdbx"
|
|
|
|
skip-go-installation: true
|
|
|
|
skip-pkg-cache: true
|
|
|
|
skip-build-cache: true
|
|
|
|
- name: Test
|
|
|
|
run: make test
|
2021-03-30 16:16:07 +00:00
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Docker
|
|
|
|
run: docker build .
|