Skip to content

Commit

Permalink
test: migrate to tt
Browse files Browse the repository at this point in the history
  • Loading branch information
DifferentialOrange committed Oct 23, 2023
1 parent 865336e commit 555ee61
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ jobs:
with:
tarantool-version: '2.11'

- 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

# Make a release
- run: echo TAG=${GITHUB_REF##*/} >> $GITHUB_ENV
- run: tarantoolctl rocks new_version --tag ${{ env.TAG }}
- run: tarantoolctl rocks install ddl-${{ env.TAG }}-1.rockspec
- run: tarantoolctl rocks pack ddl ${{ env.TAG }}
- run: tt rocks new_version --tag ${{ env.TAG }}
- run: tt rocks install ddl-${{ env.TAG }}-1.rockspec
- run: tt rocks pack ddl ${{ env.TAG }}

- uses: tarantool/rocks.tarantool.org/github-action@master
with:
Expand Down
38 changes: 27 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
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
Expand All @@ -31,26 +39,26 @@ jobs:
path: .rocks/
key: cache-rocks-${{ matrix.runs-on }}-06
-
run: tarantoolctl rocks install luacheck
run: tt rocks install luacheck
if: steps.cache-rocks.outputs.cache-hit != 'true'
-
run: tarantoolctl rocks install luatest
run: tt rocks install luatest
if: steps.cache-rocks.outputs.cache-hit != 'true'
-
run: tarantoolctl rocks install luacov
run: tt rocks install luacov
if: steps.cache-rocks.outputs.cache-hit != 'true'
-
run: tarantoolctl rocks install luacov-coveralls 0.2.3-1 --server=https://luarocks.org
run: tt rocks install luacov-coveralls 0.2.3-1 --server=https://luarocks.org
if: steps.cache-rocks.outputs.cache-hit != 'true'
- run: echo $PWD/.rocks/bin >> $GITHUB_PATH

- run: tarantoolctl rocks list
- run: tarantoolctl rocks install cartridge
- run: tt rocks list
- run: tt rocks install cartridge
env:
CMAKE_DUMMY_WEBUI: true
- run: tarantoolctl rocks remove ddl --force
- run: tt rocks remove ddl --force

- run: tarantoolctl rocks make
- run: tt rocks make
- run: cmake -S . -B build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -66,8 +74,8 @@ jobs:
if: ${{ matrix.coveralls }}

# Cleanup cached paths
- run: tarantoolctl rocks remove cartridge
- run: tarantoolctl rocks remove ddl
- run: tt rocks remove cartridge
- run: tt rocks remove ddl
benchmark:
strategy:
fail-fast: false
Expand All @@ -87,6 +95,14 @@ jobs:
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
Expand All @@ -95,7 +111,7 @@ jobs:
path: .rocks/
key: cache-rocks-${{ matrix.runs-on }}-bench-01

- run: tarantoolctl rocks install luatest
- run: tt rocks install luatest
if: steps.cache-rocks.outputs.cache-hit != 'true'

- run: tarantool ./test/bench_cache.lua
12 changes: 9 additions & 3 deletions deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

set -e

if ! [ -x "$(command -v tt)" ]; then
TTCTL=tarantoolctl
else
TTCTL=tt
fi

# Test dependencies:
tarantoolctl rocks install luatest
tarantoolctl rocks install luacov 0.13.0
tarantoolctl rocks install luacheck 0.26.0
${TTCTL} rocks install luatest
${TTCTL} rocks install luacov 0.13.0
${TTCTL} rocks install luacheck 0.26.0

0 comments on commit 555ee61

Please sign in to comment.