Skip to content

Commit f988486

Browse files
authored
CI: support of github actions (#9)
* CI: support of github actions This patch adds initial support of Githum Actions CI Currently supported: - Tests for Tarantool Community: 1.10, 2.3, 2.4, 2.5 - Tests for Tarantool Enterpise: 1.10, 2.4 - Push scm rockspecs for push to master - Push rockspecs for tags Since we want test our module using Github Actions we could drop actually unused gitlab-ci.yml.
1 parent ee09bab commit f988486

File tree

2 files changed

+70
-43
lines changed

2 files changed

+70
-43
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
ROCK_NAME: "crud"
9+
10+
jobs:
11+
run-tests-ce:
12+
strategy:
13+
matrix:
14+
tarantool-version: ["1.10", "2.3", "2.4", "2.5"]
15+
fail-fast: false
16+
runs-on: [ubuntu-latest]
17+
steps:
18+
- uses: actions/checkout@master
19+
- name: Install requirements for community
20+
run: |
21+
curl -L https://tarantool.io/installer.sh | sudo VER=${{ matrix.tarantool-version }} bash
22+
sudo apt install -y tarantool-dev
23+
./deps.sh
24+
- name: Run linter
25+
run: .rocks/bin/luacheck .
26+
- name: Run tests
27+
run: .rocks/bin/luatest -v
28+
29+
run-tests-ee:
30+
if: github.event_name == 'push'
31+
strategy:
32+
matrix:
33+
bundle_version: [ "1.10.6-36-g5c752b1", "2.4.2-17-g5c752b1" ]
34+
fail-fast: false
35+
runs-on: [ ubuntu-latest ]
36+
steps:
37+
- uses: actions/checkout@master
38+
- name: Install requirements for enterprise
39+
run: |
40+
curl -O -L https://tarantool:${{ secrets.DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/tarantool-enterprise-bundle-${{ matrix.bundle_version }}.tar.gz
41+
tar -xzf tarantool-enterprise-bundle-${{ matrix.bundle_version }}.tar.gz
42+
rm -f tarantool-enterprise-bundle-${{ matrix.bundle_version }}.tar.gz
43+
sudo cp tarantool-enterprise/tarantool /usr/bin/tarantool
44+
source tarantool-enterprise/env.sh
45+
./deps.sh
46+
- name: Run linter
47+
run: .rocks/bin/luacheck .
48+
- name: Run tests
49+
run: .rocks/bin/luatest -v
50+
51+
push-rockspec:
52+
runs-on: [ ubuntu-latest ]
53+
steps:
54+
- uses: actions/checkout@master
55+
- name: Push scm rockspec
56+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
57+
run: |
58+
curl --fail -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec \
59+
https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@${{ secrets.ROCKS_SERVER }}
60+
- name: Push release rockspec
61+
if: github.event_name == 'push' && github.ref == 'refs/tags/'
62+
run: |
63+
curl --fail -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec \
64+
https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@${{ secrets.ROCKS_SERVER }} \
65+
cat $ROCK_NAME-scm-1.rockspec |
66+
sed -E \
67+
-e "s/branch = '.+'/tag = '$GITHUB_REF'/g" \
68+
-e "s/version = '.+'/version = '$GITHUB_REF-1'/g" |
69+
curl --fail -X PUT -F "rockspec=@-;filename=$ROCK_NAME-$GITHUB_REF-1.rockspec" \
70+
https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@rocks.tarantool.org

.gitlab-ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)