From 4c826ba9453e6198b6cab3e9e954697f25917574 Mon Sep 17 00:00:00 2001 From: landa Date: Mon, 2 Mar 2026 23:38:45 +0300 Subject: [PATCH] ci: rethinking version check Version check makes git clean before work and cleans all previous rocks installation. The idea is to install needed packages to the directory where it won't be cleaned by git and add this directory to the lua path before version check. Part of #77 --- .github/workflows/packaging.yml | 16 ++++++++++++---- .github/workflows/publish.yml | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index df8b81b..811f9a1 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -15,21 +15,29 @@ jobs: if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} runs-on: ubuntu-24.04 steps: - - name: Clone the module - uses: actions/checkout@v6 - - name: Install tarantool uses: tarantool/setup-tarantool@v4 with: tarantool-version: '2.11' + - name: Setup tt + run: | + curl -L https://tarantool.io/release/3/installer.sh | sudo bash + sudo apt install -y tt + - name: Install roles requirements - run: make deps-cartridge + run: tt rocks install cartridge 2.16.6 --tree $HOME/tmp - name: Check module version for api uses: tarantool/actions/check-module-version@master with: module-name: 'sharded_queue.api' + version-pre-extraction-hook: | + local home = os.getenv('HOME') + package.path = package.path .. ';' .. home .. '/tmp/share/tarantool/?.lua;' .. + home .. '/tmp/share/tarantool/?/init.lua' + package.cpath = package.cpath .. ';' .. home .. '/tmp/lib/tarantool/?.so' + - name: Check module version for storage uses: tarantool/actions/check-module-version@master with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e601ec5..88249ec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,21 +11,29 @@ jobs: if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} runs-on: ubuntu-24.04 steps: - - name: Clone the module - uses: actions/checkout@v6 - - name: Install tarantool uses: tarantool/setup-tarantool@v4 with: tarantool-version: '2.11' + - name: Setup tt + run: | + curl -L https://tarantool.io/release/3/installer.sh | sudo bash + sudo apt install -y tt + - name: Install roles requirements - run: make deps-cartridge + run: tt rocks install cartridge 2.16.6 --tree $HOME/tmp - name: Check module version for api uses: tarantool/actions/check-module-version@master with: module-name: 'sharded_queue.api' + version-pre-extraction-hook: | + local home = os.getenv('HOME') + package.path = package.path .. ';' .. home .. '/tmp/share/tarantool/?.lua;' .. + home .. '/tmp/share/tarantool/?/init.lua' + package.cpath = package.cpath .. ';' .. home .. '/tmp/lib/tarantool/?.so' + - name: Check module version for storage uses: tarantool/actions/check-module-version@master with: