Skip to content

rewrite tests on luatest #109

rewrite tests on luatest

rewrite tests on luatest #109

Workflow file for this run

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@v3
with:
tarantool-version: ${{ matrix.tarantool-version }}
- name: Setup Java 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Install requirements for community
run: |
curl -L https://tarantool.io/release/2/installer.sh | bash
sudo apt-get -y install tt
curl -sSL https://zipkin.io/quickstart.sh | bash -s
tt rocks install ldoc --server=http://rocks.moonscript.org
tt rocks install luacheck 0.25.0
./deps.sh
export PATH=.rocks/bin:$PATH
tt 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 10
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