Skip to content

Commit

Permalink
ci: add reusable testing workflow
Browse files Browse the repository at this point in the history
The idea of this workflow is to be a part of the 'integration.yml'
workflow from the tarantool repo to verify the integration of the
expirationd module with an arbitrary tarantool version.

This workflow is not triggered on a push to the repo and cannot be run
manually since it has only the 'workflow_call' trigger. This workflow
will be included in the tarantool development cycle and called by the
'integration.yml' workflow from the tarantool project on a push to the
master and release branches for verifying integration of tarantool with
expirationd.

Part of tarantool/tarantool#6528
Part of tarantool/tarantool#5265
Part of tarantool/tarantool#6056
  • Loading branch information
ylobankov committed Oct 21, 2021
1 parent 3fcf04a commit 7a0da38
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/reusable_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: reusable_testing

on:
workflow_call:
inputs:
artifact_name:
description: 'The name of the tarantool build artifact'
default: ubuntu-focal
required: false
type: string

jobs:
run_tests:
runs-on: ubuntu-20.04
steps:
- name: 'Clone the expirationd module'
uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/expirationd

- name: 'Download the Tarantool build artifact'
uses: actions/download-artifact@v2
with:
name: ${{ inputs.artifact_name }}

- name: 'Install Tarantool'
# TODO(ylobankov): Install package dependencies. Now we're lucky: all
# dependencies are already there.
run: sudo dpkg -i tarantool*.deb

- run: make deps
- run: make test

6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ luacheck:

.PHONY: test
test:
luatest -v

.PHONY: test-coverage
test-coverage:
luatest -v --coverage
rm -rf ${CLEANUP_FILES}
INDEX_TYPE='TREE' SPACE_TYPE='vinyl' ./test.lua
Expand All @@ -41,7 +45,7 @@ test:
INDEX_TYPE='TREE' ./test.lua
rm -rf ${CLEANUP_FILES}

$(LUACOV_STATS): test
$(LUACOV_STATS): test-coverage

coverage: $(LUACOV_STATS)
sed -i -e 's@'"$$(realpath .)"'/@@' $(LUACOV_STATS)
Expand Down

0 comments on commit 7a0da38

Please sign in to comment.