Skip to content

Fix action not working on debians and in containers #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/actions/latest-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
# # ---> 1.10.13-0
# - run: echo ${{ steps.latest-version.outputs.git-describe }}
# # ---> 1.10.13-0-g1d2c5aad5
#
# Caution: It works smoothly only for 1.10/2.8, but not for 2.10+
# due to changes in the package versioning (see the new release
# policy document, [1]).
#
# [1]: https://github.com/tarantool/tarantool/discussions/6182

name: 'Latest tarantool version'
description: 'Get latest tarantool version of given release series'
Expand Down Expand Up @@ -80,6 +74,22 @@ runs:
* parts[5]: '1'
*/
var parts = v.split(/[.-]/)
var major = Number(parts[0])
var minor = Number(parts[1])

/*
* Fix version format change after 2.10
* due to changes in the package versioning (see the new release
* policy document, [1]).
*
* [1]: https://github.com/tarantool/tarantool/discussions/6182
*/
if (
major >= 3 ||
(major == 2 && minor >= 10)
) {
parts.splice(3, 0, '0');
}

var abc = parts.slice(0, 3).join('.')
var abcd = `${abc}.${parts[3]}`
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test in docker

on:
push:

jobs:
test:
runs-on: ['ubuntu-22.04']

strategy:
fail-fast: false
matrix:
tarantool:
- '1.10'
- '2.10'
- '2.11'

image:
- ubuntu:focal
- ubuntu:jammy
- debian:buster
- debian:bullseye

# Only 2.11 is available on debian bookworm
include:
- tarantool: '2.11'
image: debian:bookworm

container:
image: ${{ matrix.image }}

env:
TARANTOOL_CACHE_KEY_SUFFIX: -DA-${{ matrix.image }}-${{ github.run_id }}
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC

steps:
- name: Setup system
run: |
apt-get -y update
apt-get -y upgrade
apt-get -y install --no-install-recommends --no-install-suggests \
tzdata sudo lsb-release gnupg ca-certificates rsync

- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: '18.18.0'

- uses: actions/checkout@v4

- id: latest-version
uses: ./.github/actions/latest-version
with:
tarantool-series: '${{ matrix.tarantool }}'

- name: Setup from scratch
uses: ./
with:
tarantool-version: ${{ matrix.tarantool }}

- name: Check precise version
uses: ./.github/actions/verify-version
with:
tarantool-version: '${{ steps.latest-version.outputs.git-describe }}'
from-cache: false

- name: Uninstall tarantool
run: sudo apt-get -y remove tarantool tarantool-dev tarantool-common

- name: Setup from cache
uses: ./
with:
tarantool-version: ${{ matrix.tarantool }}

- name: Verify install from cache
uses: ./.github/actions/verify-version
with:
tarantool-version: '${{ steps.latest-version.outputs.git-describe }}'
from-cache: true
25 changes: 12 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
# so just use it.
- {runs-on: ubuntu-22.04, tarantool: '2.10', nightly: false}
- {runs-on: ubuntu-20.04, tarantool: '1.10', nightly: true}
- {runs-on: ubuntu-18.04, tarantool: '1.10', nightly: true}
runs-on: ${{ matrix.runs-on }}
env:
TARANTOOL_CACHE_KEY_SUFFIX: -A-${{ github.run_id }}
Expand Down Expand Up @@ -106,10 +105,10 @@ jobs:
#
# It performs the following steps and checks.
#
# - install 1.10.12
# - install 1.10.14
# - checks: version, non-cached
# - uninstall tarantool
# - install 1.10.12
# - install 1.10.14
# - checks: version, cached
# - install 1.10.LATEST
# - checks: version, non-cached
Expand All @@ -125,29 +124,29 @@ jobs:
with:
tarantool-series: '1.10'

- name: Install 1.10.12 (non-cached)
- name: Install 1.10.14 (non-cached)
uses: ./
with:
tarantool-version: '1.10.12'
tarantool-version: '1.10.14'
nightly-build: false

- uses: ./.github/actions/verify-version
with:
tarantool-version: '1.10.12-0'
tarantool-version: '1.10.14-0'
from-cache: false

- name: Uninstall tarantool
run: sudo apt-get -y remove tarantool tarantool-dev tarantool-common

- name: Install 1.10.12 (cached)
- name: Install 1.10.14 (cached)
uses: ./
with:
tarantool-version: '1.10.12'
tarantool-version: '1.10.14'
nightly-build: false

- uses: ./.github/actions/verify-version
with:
tarantool-version: '1.10.12-0'
tarantool-version: '1.10.14-0'
from-cache: true

- name: Install 1.10.LATEST (non-cached)
Expand All @@ -165,7 +164,7 @@ jobs:
# without any problem after a three digit version (not a latest
# one).
#
# - install 1.10.12
# - install 1.10.14
# - checks: version, non-cached
# - uninstall tarantool
# - install 1.10
Expand All @@ -182,15 +181,15 @@ jobs:
with:
tarantool-series: '1.10'

- name: Install 1.10.12 (non-cached)
- name: Install 1.10.14 (non-cached)
uses: ./
with:
tarantool-version: '1.10.12'
tarantool-version: '1.10.14'
nightly-build: false

- uses: ./.github/actions/verify-version
with:
tarantool-version: '1.10.12-0'
tarantool-version: '1.10.14-0'
from-cache: false

- name: Uninstall tarantool
Expand Down
Loading