-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (60 loc) · 1.75 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
name: Test
on:
push:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-20.04]
tarantool:
- '1.10'
- '2.6'
- '2.7'
- '2.8'
- '2.10'
runs-on: ${{ matrix.runs-on }}
env:
CMAKE_LDOC_FIND_REQUIRED: 'YES'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8.14"
- uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool }}
# Setup python packages
- name: Cache pip packages
uses: actions/cache@v3
id: cache-venv
with:
path: ./venv
key: cache-venv-${{ matrix.runs-on }}-01
- name: Run pip install
run: |
python -m venv ./venv && . ./venv/bin/activate
pip install -r test/requirements.txt
if: steps.cache-venv.outputs.cache-hit != 'true'
- run: echo "$PWD/venv/bin" >> $GITHUB_PATH
# Setup luacheck and ldoc
- name: Cache rocks
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
key: cache-rocks-${{ matrix.runs-on }}-01
-
run: tarantoolctl rocks install luacheck
if: steps.cache-rocks.outputs.cache-hit != 'true'
-
run: tarantoolctl rocks install ldoc --server=https://tarantool.github.io/LDoc/
if: steps.cache-rocks.outputs.cache-hit != 'true'
- run: echo ".rocks/bin" >> $GITHUB_PATH
- run: luacheck membership-scm-1.rockspec
- run: flake8 test --ignore=E501
- run: tarantoolctl rocks make
- run: pytest -v
# Cleanup cached paths
- run: tarantoolctl rocks remove membership