From 53733385520df229aa3ff7e0b13125406c804388 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 8 Nov 2022 17:39:20 +0300 Subject: [PATCH] ci: run tests with deb package See [1] about older versions support. Only LTS Ubuntu versions are included here. 1. https://github.com/tarantool/tarantool-python/issues/257 Part of #198 --- .github/workflows/packing.yml | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/packing.yml b/.github/workflows/packing.yml index 6161fc12..ee211716 100644 --- a/.github/workflows/packing.yml +++ b/.github/workflows/packing.yml @@ -422,3 +422,71 @@ jobs: with: name: deb_dist path: deb_dist + + run_tests_deb: + needs: pack_deb + + # We want to run on external PRs, but not on our own internal + # PRs as they'll be run by the push to the branch. + # + # The main trick is described here: + # https://github.com/Dart-Code/Dart-Code/pull/2375 + if: (github.event_name == 'push') || + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name != github.repository) + runs-on: ubuntu-latest + + container: + image: ${{ matrix.target.os }}:${{ matrix.target.dist }} + + strategy: + fail-fast: false + + matrix: + target: + - os: ubuntu + dist: focal # 20.04 + - os: ubuntu + dist: jammy # 22.04 + - os: debian + dist: buster # 10 + - os: debian + dist: bullseye # 11 + + steps: + - name: Clone the connector repo + uses: actions/checkout@v3 + + - name: Prepare apt + run: apt update + + - name: Setup Python + run: apt install -y python3 python3-pip git + + - name: Remove connector source code + run: python3 .github/scripts/remove_source_code.py + + - name: Install tarantool ${{ matrix.tarantool }} + run: | + apt install -y curl + curl -L https://tarantool.io/yeohchA/release/2/installer.sh | bash + apt install -y tarantool tarantool-dev + env: + DEBIAN_FRONTEND: noninteractive + + - name: Download deb artifacts + uses: actions/download-artifact@v3 + with: + name: deb_dist + path: deb_dist + + - name: Install the package from deb artifacts + run: apt install -y `pwd`/deb_dist/python3-tarantool_*.deb + env: + DEBIAN_FRONTEND: noninteractive + + - name: Install test requirements + run: pip3 install -r requirements-test.txt + + - name: Run tests + run: make test-pure-install