|
| 1 | +name: testing |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - 'master' |
| 9 | + tags: |
| 10 | + - '*' |
| 11 | + |
| 12 | +jobs: |
| 13 | + linux: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + tarantool: |
| 20 | + - '1.10' |
| 21 | + - '2.8' |
| 22 | + - '2.9' |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Clone the connector |
| 26 | + uses: actions/checkout@v2 |
| 27 | + |
| 28 | + - name: Setup tarantool ${{ matrix.tarantool }} |
| 29 | + uses: tarantool/setup-tarantool@v1 |
| 30 | + with: |
| 31 | + tarantool-version: ${{ matrix.tarantool }} |
| 32 | + |
| 33 | + - name: Setup golang for the connector and tests |
| 34 | + uses: actions/setup-go@v2 |
| 35 | + with: |
| 36 | + go-version: 1.13 |
| 37 | + |
| 38 | + - name: Setup node.js for tests |
| 39 | + uses: actions/setup-node@v2 |
| 40 | + with: |
| 41 | + node-version: 10.19.0 |
| 42 | + |
| 43 | + - name: Run base tests |
| 44 | + run: | |
| 45 | + mkdir snap xlog |
| 46 | + TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!) |
| 47 | + go clean -testcache && go test -v |
| 48 | + kill $TNT_PID |
| 49 | +
|
| 50 | +# - name: Run queue tests |
| 51 | +# working-directory: ./queue |
| 52 | +# run: | |
| 53 | +# mkdir snap xlog |
| 54 | +# tarantoolctl rocks install queue 1.1.0 |
| 55 | +# TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!) |
| 56 | +# go clean -testcache && go test -v |
| 57 | +# kill $TNT_PID |
| 58 | + |
| 59 | + - name: Run uuid tests |
| 60 | + working-directory: ./uuid |
| 61 | + run: | |
| 62 | + mkdir snap xlog |
| 63 | + TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!) |
| 64 | + go clean -testcache && go test -v |
| 65 | + kill $TNT_PID |
| 66 | + if: ${{ matrix.tarantool != 1.10 }} |
| 67 | + |
| 68 | + - name: Run multi tests |
| 69 | + working-directory: ./multi |
| 70 | + run: | |
| 71 | + mkdir -p m1/{snap,xlog} m2/{snap,xlog} |
| 72 | + tarantool ./config_m1.lua > tarantool_m1.log 2>&1 & |
| 73 | + tarantool ./config_m2.lua > tarantool_m2.log 2>&1 & |
| 74 | + go clean -testcache && go test -v |
0 commit comments