Skip to content

Package everything #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: run tests with pip package
Part of #198
  • Loading branch information
DifferentialOrange committed Nov 9, 2022
commit 8cb948db162355d5bee05d627958b25dbdbd4983
121 changes: 121 additions & 0 deletions .github/workflows/packing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,124 @@ jobs:
path: pip_dist
retention-days: 1
if-no-files-found: error

run_tests_pip_package_linux:
needs: pack_pip

# 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

strategy:
fail-fast: false

steps:
- name: Clone the connector repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Remove connector source code
run: python3 .github/scripts/remove_source_code.py

- name: Install tarantool
uses: tarantool/setup-tarantool@v1
with:
tarantool-version: '2.10'

- name: Download pip package artifacts
uses: actions/download-artifact@v3
with:
name: pip_dist
path: pip_dist

- name: Install the package from pip artifacts
run: pip3 install pip_dist/*.whl

- name: Install test requirements
run: pip3 install -r requirements-test.txt

- name: Run tests
run: make test-pure-install

run_tests_pip_package_windows:
needs: pack_pip

# 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: windows-latest

strategy:
fail-fast: false

steps:
- name: Clone the connector repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Remove connector source code
run: python3 .github/scripts/remove_source_code.py

- name: Download pip package artifacts
uses: actions/download-artifact@v3
with:
name: pip_dist
path: pip_dist

- name: Install the package from pip artifacts
run: pip3 install (gci ./pip_dist *.whl).fullname

- name: Install test requirements
run: pip3 install -r requirements-test.txt

- name: Setup WSL for tarantool
uses: Vampire/setup-wsl@v1
with:
distribution: Ubuntu-20.04

- name: Install tarantool
shell: wsl-bash_Ubuntu-20.04 {0}
run: |
curl -L https://tarantool.io/release/2/installer.sh | bash -s
sudo apt install -y tarantool tarantool-dev

- name: Setup test tarantool instance
shell: wsl-bash_Ubuntu-20.04 {0}
run: |
rm -f ./tarantool.pid ./tarantool.log
TNT_PID=$(tarantool ./test/suites/lib/tarantool_python_ci.lua > tarantool.log 2>&1 & echo $!)
touch tarantool.pid
echo $TNT_PID > ./tarantool.pid

- name: Run tests
env:
REMOTE_TARANTOOL_HOST: localhost
REMOTE_TARANTOOL_CONSOLE_PORT: 3302
run: make test-pure-install

- name: Stop test tarantool instance
if: ${{ always() }}
shell: wsl-bash_Ubuntu-20.04 {0}
run: |
cat tarantool.log || true
kill $(cat tarantool.pid) || true
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
env:
TEST_TNT_SSL: ${{ matrix.tarantool == '2.10.0-1-gfa775b383-r486-linux-x86_64' }}

run_tests_with_install_linux:
run_tests_pip_branch_install_linux:
# 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.
#
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
cat tarantool.log || true
kill $(cat tarantool.pid) || true

run_tests_with_install_windows:
run_tests_pip_branch_install_windows:
# 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.
#
Expand Down