test: refactor hooks for luatest API change #1678
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-run | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| if: ( github.event_name == 'push' || | |
| github.event.pull_request.head.repo.full_name != github.repository ) && | |
| ( github.repository == 'tarantool/test-run' ) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
| tarantool-version: ['2.10', '2.11'] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| submodules: recursive | |
| - name: set up Tarantool ${{ matrix.tarantool-version }} | |
| uses: tarantool/setup-tarantool@v2 | |
| with: | |
| tarantool-version: ${{ matrix.tarantool-version }} | |
| - name: set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: display python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: setup tt | |
| run: | | |
| curl -L https://tarantool.io/release/2/installer.sh | sudo bash | |
| sudo apt install -y tt | |
| tt version | |
| - name: setup dependencies | |
| run: | | |
| tt rocks install luatest | |
| tt rocks install luacheck | |
| - name: setup python dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| pip install -r requirements-test.txt | |
| - name: run static analysis | |
| run: | | |
| make lint | |
| - name: run unit testing | |
| run: | | |
| # Flush the variable to don't spoil job summary with tests, | |
| # which are expected to fail. | |
| GITHUB_STEP_SUMMARY= make test_unittest | |
| - name: run integration testing | |
| run: | | |
| make test_integration | |
| - name: code coverage | |
| if: ${{ matrix.python-version == '3.8' && matrix.tarantool-version == '2.10' }} | |
| run: | | |
| pip install coveralls==3.* | |
| make coverage | |
| - name: upload coverage data to coveralls.io | |
| if: ${{ matrix.python-version == '3.8' && matrix.tarantool-version == '2.10' }} | |
| run: coveralls --service=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |