-
Notifications
You must be signed in to change notification settings - Fork 5
115 lines (95 loc) · 3.1 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Test
on:
push:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
tarantool: ['1.10', '2.5', '2.6', '2.7', '2.8', '2.10']
coveralls: [false]
include:
- tarantool: '2.11'
coveralls: true
# There are problems with current version of the
# setup-tarantool action on Ubuntu Jammy (ubuntu-latest or
# ubuntu-22.04). Use Ubuntu Focal (ubuntu-20.04) until they
# will be resolved. See [1] for details.
#
# [1]: https://github.com/tarantool/setup-tarantool/issues/36
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
- uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool }}
- name: Prepare apt repo
run: curl -L https://tarantool.io/release/2/installer.sh | bash
- name: Install tt cli
run: sudo apt install -y tt
env:
DEBIAN_FRONTEND: noninteractive
# Setup luatest and luacheck
- name: Cache rocks
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
key: cache-rocks-${{ matrix.runs-on }}-07
- name: Install test dependencies
run: ./deps.sh
if: steps.cache-rocks.outputs.cache-hit != 'true'
- run: echo $PWD/.rocks/bin >> $GITHUB_PATH
- run: tt rocks list
- run: tt rocks install cartridge
env:
CMAKE_DUMMY_WEBUI: true
- run: tt rocks remove ddl --force
- run: tt rocks make
- run: cmake -S . -B build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run luacheck
run: make -C build luacheck
- name: Run tests and code coverage analysis
run: make -C build coverage
- name: Send code coverage to coveralls.io
run: make -C build coveralls
if: ${{ matrix.coveralls }}
# Cleanup cached paths
- run: tt rocks remove cartridge
- run: tt rocks remove ddl
benchmark:
strategy:
fail-fast: false
matrix:
tarantool: ['2.11']
# There are problems with current version of the
# setup-tarantool action on Ubuntu Jammy (ubuntu-latest or
# ubuntu-22.04). Use Ubuntu Focal (ubuntu-20.04) until they
# will be resolved. See [1] for details.
#
# [1]: https://github.com/tarantool/setup-tarantool/issues/36
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
- uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool }}
- name: Prepare apt repo
run: curl -L https://tarantool.io/release/2/installer.sh | bash
- name: Install tt cli
run: sudo apt install -y tt
env:
DEBIAN_FRONTEND: noninteractive
# Setup luatest
- name: Cache rocks
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
key: cache-rocks-${{ matrix.runs-on }}-bench-01
- run: tt rocks install luatest
if: steps.cache-rocks.outputs.cache-hit != 'true'
- run: tarantool ./test/bench_cache.lua