Skip to content

try v2

try v2 #74

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-24.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: |
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: 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