-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (86 loc) · 3.31 KB
/
test_on_push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Run tests
on:
push:
pull_request:
env:
ROCK_NAME: "tracing"
jobs:
version-check-opentracing:
# We need this job to run only on push with tag.
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-20.04
steps:
- name: Check module version
uses: tarantool/actions/check-module-version@master
with:
module-name: 'opentracing'
version-check-zipkin:
# We need this job to run only on push with tag.
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-20.04
steps:
- name: Check module version
uses: tarantool/actions/check-module-version@master
with:
module-name: 'zipkin.tracer'
run-tests-ce:
strategy:
matrix:
tarantool-version: ["1.10", "2.10"]
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Setup Tarantool CE
uses: tarantool/setup-tarantool@v2
with:
tarantool-version: ${{ matrix.tarantool-version }}
- name: Install requirements for community
run: |
sudo apt-get -y update
sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get -y install openjdk-21-jdk
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 1
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
curl -sSL https://zipkin.io/quickstart.sh | bash -s
tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org
tarantoolctl rocks install luacheck 0.25.0
./deps.sh
export PATH=.rocks/bin:$PATH
tarantoolctl rocks make
- name: Run linter
run: |
.rocks/bin/luacheck ./tracing --config=.luacheckrc --no-redefined --no-unused-args
.rocks/bin/luacheck ./test --config=.luacheckrc --no-redefined --no-unused-args
- name: java version
run: java -version
- name: Run tests
run: |
java -jar zipkin.jar &
sleep 20
make unit
- name: Build doc
run: .rocks/bin/ldoc -t "$ROCK_NAME-${version}" -p "$ROCK_NAME (${version})" --all .
push-rockspec-scm-1:
runs-on: [ ubuntu-latest ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- name: Push scm rockspec
run: |
curl --fail -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec \
https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@${{ secrets.ROCKS_SERVER }}
push-rockspec-tag:
runs-on: [ ubuntu-latest ]
if: github.event_name == 'push' && github.ref == 'refs/tags/'
needs: [version-check-opentracing, version-check-zipkin]
steps:
- uses: actions/checkout@master
- name: Push release rockspec
run: |
cat $ROCK_NAME-scm-1.rockspec |
sed -E \
-e "s/branch = '.+'/tag = '$GITHUB_REF'/g" \
-e "s/version = '.+'/version = '$GITHUB_REF-1'/g" |
curl --fail -X PUT -F "rockspec=@-;filename=$ROCK_NAME-$GITHUB_REF-1.rockspec" \
https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@rocks.tarantool.org