Skip to content

api: add Tarantool 3 roles #170

api: add Tarantool 3 roles

api: add Tarantool 3 roles #170

Workflow file for this run

name: tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
linux:
# We want to run on external PRs, but not on our own internal
# PRs as they'll be run by the push to the branch.
#
# The main trick is described here:
# https://github.com/Dart-Code/Dart-Code/pull/2375
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
tarantool:
- '2.8'
- '2.10'
cartridge: [true]
coveralls: [false]
metrics: [false]
include:
- tarantool: '2.11'
cartridge: true
coveralls: true
metrics: true
- tarantool: 'master'
cartridge: false
coveralls: false
metrics: false
runs-on: ubuntu-20.04
steps:
- name: Clone the module
uses: actions/checkout@v3
- name: Setup tt
run: |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
sudo apt install -y tt
- name: Install tarantool ${{ matrix.tarantool }}
uses: tarantool/setup-tarantool@v3
with:
tarantool-version: ${{ matrix.tarantool }}
if: matrix.tarantool != 'master'
- name: Get Tarantool master latest commit
if: matrix.tarantool == 'master'
run: |
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
shell: bash
- name: Cache Tarantool master
if: matrix.tarantool == 'master'
id: cache-latest
uses: actions/cache@v3
with:
path: "${GITHUB_WORKSPACE}/bin"
key: cache-latest-${{ env.LATEST_COMMIT }}
- name: Setup Tarantool CE (master)
if: matrix.tarantool == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
run: |
tt init
tt install tarantool master
- name: Add tt Tarantool to PATH
if: matrix.tarantool == 'master'
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
- name: Install requirements
run: |
tarantool --version
make deps
- name: Install Cartridge requirements
run: make deps-cartridge
if: ${{ matrix.cartridge }}
- name: Install metrics requirements
run: make deps-metrics
if: ${{ matrix.metrics }}
- name: Run linter
run: make lint
- name: Run tests
run: make test
- name: Run tests with coverage
run: make coverage
if: ${{ matrix.coveralls }}
- name: Send code coverage to coveralls.io
run: .rocks/bin/luacov-coveralls -i sharded_queue
if: ${{ matrix.coveralls }}
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}