Skip to content
Snippets Groups Projects
Commit 8ac76fd6 authored by Yaroslav Lobankov's avatar Yaroslav Lobankov Committed by Alexander Turenko
Browse files

ci: add workflow for checking module integration

For now, there is no testing for the tarantool project verifying its
integration with different modules and connectors from the ecosystem.
This is a quite huge gap in our CI system that is going to be covered
by these changes.

This patch introduces a couple of new workflow files that are named
'integration.yml' and 'reusable_build.yml'. The main workflow is
'integration.yml' that will run automatically per push to master and
release branches. Also, this workflow can be run manually against a
development branch. The 'reusable_build.yml' workflow is called by the
main workflow and builds needed tarantool packages (at this moment for
Ubuntu Focal Fossa only), then stores them as a build artifact. After
that, the main workflow calls the 'reusable_testing.yml' workflow from
a module project that tarantool is going to verify integration with.
The testing workflow should download the tarantool build artifact and
run tests against it.

The basic scheme describing the verification process is represented
below:

      integration.yml
             |
             |
             v
     reusable_build.yml --> <artifact>
             |                  |
             |                  |
             v                  |
    reusable_testing.yml <------+
             |
             |
             v
          <result>

For now, we start only with the vshard module. In the future, we are
going to extend the module list incrementally.

Part of #5265
Part of #6056
Closes #4972
parent 298eebf7
No related branches found
No related tags found
No related merge requests found
name: integration
on:
push:
branches:
- 'master'
- '[0-9].[0-9]+' # release branches
tags:
- '*'
workflow_dispatch:
jobs:
tarantool:
uses: tarantool/tarantool/.github/workflows/reusable_build.yml@master
with:
ref: ${{ github.ref }}
os: ubuntu
dist: focal
vshard:
needs: tarantool
uses: tarantool/vshard/.github/workflows/reusable_testing.yml@master
with:
artifact_name: tarantool-ubuntu-focal-${{ github.sha }}
name: reusable_build
on:
workflow_call:
inputs:
ref:
description: |
The tarantool branch, tag, or commit SHA to checkout for build
default: master
required: false
type: string
os:
description: 'The name of the OS to build tarantool packages for'
default: ubuntu
required: false
type: string
dist:
description: 'The version of the OS'
default: focal
required: false
type: string
jobs:
build:
runs-on: ubuntu-20.04
env:
OS: ${{ inputs.os }}
DIST: ${{ inputs.dist }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ inputs.ref }}
# Fetch the entire history for all branches and tags.
fetch-depth: 0
# Enable recursive submodules checkout.
submodules: recursive
- name: 'Get the commit SHA'
id: get_sha
run: echo "::set-output name=sha::$(git log -1 --format='%H')"
- uses: ./.github/actions/environment
- name: 'Build tarantool packages for ${{ env.OS }}(${{ env.DIST }})'
id: run_build
env:
# Our testing expects that the init process (PID 1) will
# reap orphan processes. At least the following test leans
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
PACKPACK_EXTRA_DOCKER_RUN_PARAMS: --init
# There are packages like tzdata or postfix, whose configuration
# is interactive by default. The environment variable below
# forbids interactive configuration phase. Otherwise the CI gets
# stuck from time to time on `apt-get update`.
DEBIAN_FRONTEND: noninteractive
run: make -f .gitlab.mk package
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v2
with:
name: tarantool-${{ env.OS }}-${{ env.DIST }}-${{ steps.get_sha.outputs.sha }}
retention-days: 21
path: |
build/tarantool*.deb
build/tarantool*.rpm
if-no-files-found: error
- name: 'Upload logs if the build failed'
if: failure() && steps.run_build.conclusion == 'failure'
uses: actions/upload-artifact@v2
with:
name: tarantool-build-log-${{ env.OS }}-${{ env.DIST }}-${{ steps.get_sha.outputs.sha }}
retention-days: 21
path: build/*build*
if-no-files-found: error
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment