Skip to content

About

Setup Tarantool for use with Github Actions

Topics

Resources

Stars

8 stars

Watchers

5 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Test

Setup Tarantool

This action will set up Tarantool environment and cache the packages.

  • When cached, it takes ~1-2s to finish.
  • The first run takes ~40s.
  • Cache size is 20MB-30MB.
  • Runs on GitHub-hosted ubuntu-* runners.
  • Runs on Debian/Ubuntu self-hosted runners.
  • Runs inside Debian/Ubuntu container jobs.

Usage

Basic

steps:
  - uses: actions/checkout@v4
  - uses: tarantool/setup-tarantool@v4
    with:
      tarantool-version: '2.11'
  - run: tarantoolctl rocks install luatest
  - run: tarantoolctl rocks make
  - run: .rocks/bin/luatest -v

Install an exact version

steps:
  - uses: actions/checkout@v4
  - uses: tarantool/setup-tarantool@v4
    with:
      tarantool-version: '2.11.7'

Install tt

The action installs tt if tt-version is given: the latest tt release that matches it is downloaded from GitHub. The version is given the same way as tarantool-version: '2', '2.15' or '2.15.0'. Releases without an archive for the runner's arch are skipped. The action fails if there is no matching release with such an archive.

Pre-releases are installed only if requested exactly, say, '3.0.0-alpha.1': '3' gives the latest stable tt 3.

tt 3 doesn't support tarantool < 3, so the action fails if tt 3 is requested for tarantool 1.10 or 2.x. 'any' gives the latest stable tt that supports the tarantool version: the latest stable tt 2 for tarantool 1.10 and 2.x, the latest stable tt of any series for tarantool 3 (tt 2 while tt 3 has pre-releases only).

steps:
  - uses: actions/checkout@v4
  - uses: tarantool/setup-tarantool@v4
    with:
      tarantool-version: '3'
      tt-version: 'any'  # or, say, '2' or '2.15.0'

Install a nightly build

Important: nightly builds are not available for 2.10.0 and newer.

steps:
  - uses: actions/checkout@v4
  - uses: tarantool/setup-tarantool@v4
    with:
      tarantool-version: '2.6'  # or, say, '2.6.1.0' for exact version
      nightly-build: true

Self-hosted runners and container jobs

It requires an additional step to bring dependencies needed for the action itself. These dependencies are preinstalled on GitHub hosted runners, but a self-hosted runner and a docker image may miss them.

Configuring apt-get to skip recommended and suggested packages reduces the cache size from ~200MiB to ~30MiB.

tt needs no more dependencies: the action downloads it on its own and unpacks it with tar and gzip, which every Debian and Ubuntu image has. A self-hosted runner keeps tt in its tool cache (RUNNER_TOOL_CACHE) between jobs, so tt is downloaded only once there.

jobs:
  myjob:
    runs-on: ubuntu-latest
    container:
      image: debian:bookworm

    env:
      DEBIAN_FRONTEND: noninteractive

    steps:
      - name: Configure apt-get
        run: |
          mkdir -p /etc/apt/apt.conf.d
          printf '%s\n%s\n'                    \
            'APT::Install-Recommends "false";' \
            'APT::Install-Suggests "false";'   \
            > /etc/apt/apt.conf.d/no-recommends-no-suggests.conf

      - name: Update repositories metadata
        run: |
          apt-get -y update

      - name: Workaround interactive tzdata configuration problem (gh-50)
        run:
          apt-get -y install tzdata

      - name: Install setup-tarantool dependencies
        run: |
          apt-get -y install sudo lsb-release ca-certificates rsync

      - uses: tarantool/setup-tarantool@v4
        with:
          tarantool-version: '2.11'

License

The scripts and documentation in this project are released under the MIT License.

Contributions

Contributions are welcome! Just open an issue or send a pull request.

Check out HACKING.md file for hints.

About

Setup Tarantool for use with Github Actions

Topics

Resources

Stars

8 stars

Watchers

5 watching

Forks

Releases

Contributors

Languages