-
-
Notifications
You must be signed in to change notification settings - Fork 596
44 lines (40 loc) · 1.52 KB
/
test.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
name: test
on: [push, pull_request]
jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
# Prevent duplicate builds on internal PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.1
args: --timeout 3m0s
test:
name: Test with Go ${{ matrix.go-version }}
runs-on: ubuntu-latest
# Prevent duplicate builds on internal PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
go-version: [1.20.7]
tarantool-version: [2.7.2]
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install rocks
run: docker run --rm -v $(pwd)/misc/tnt:/opt/tarantool tarantool/tarantool:${{ matrix.tarantool-version }} tarantoolctl rocks install https://raw.githubusercontent.com/centrifugal/tarantool-centrifuge/main/centrifuge-scm-1.rockspec
- name: Start Tarantool
run: docker run -d -p 3301:3301 -v $(pwd)/misc/tnt:/opt/tarantool tarantool/tarantool:${{ matrix.tarantool-version }} tarantool /opt/tarantool/init.lua
- name: Test
run: make test-integration