-
Notifications
You must be signed in to change notification settings - Fork 46
Fix module installation #241
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
DifferentialOrange
merged 7 commits into
master
from
DifferentialOrange/gh-238-fix-install
Oct 14, 2022
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
abb1b59
setup: get package requirements from file
DifferentialOrange 0051dc4
setup: fix MANIFEST
DifferentialOrange 2bc92a1
setup: fix MANIFEST usage
DifferentialOrange e98da1a
setup: list package without path
DifferentialOrange 3d03b99
setup: fix subpackages install
DifferentialOrange 8bb2c37
ci: run pure install tests
DifferentialOrange c3d45e4
ci: extend Windows test matrix
DifferentialOrange File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,57 @@ jobs: | |
env: | ||
TEST_TNT_SSL: ${{ matrix.tarantool == '2.10.0-1-gfa775b383-r486-linux-x86_64' }} | ||
|
||
run_tests_with_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. | ||
# | ||
# 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-20.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
tarantool: | ||
- '2.10' | ||
python: | ||
- '3.6' | ||
- '3.7' | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
steps: | ||
- name: Clone the connector repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Remove connector source code | ||
run: | | ||
rm -rf tarantool | ||
rm setup.py | ||
|
||
- name: Install tarantool ${{ matrix.tarantool }} | ||
uses: tarantool/setup-tarantool@v1 | ||
with: | ||
tarantool-version: ${{ matrix.tarantool }} | ||
|
||
- name: Setup Python for tests | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install the package with pip | ||
run: pip install git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_REF_NAME | ||
|
||
- name: Install test requirements | ||
run: pip install -r requirements-test.txt | ||
|
||
- name: Run tests | ||
run: python -m unittest discover -v | ||
|
||
run_tests_ce_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. | ||
|
@@ -163,11 +214,13 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Use reduced test matrix cause Windows pipelines are long. | ||
tarantool: | ||
- '1.10' | ||
- '2.8' | ||
- '2.10.0.g0a5ce0b9c-1' | ||
python: | ||
- '3.6' | ||
- '3.10' | ||
|
||
steps: | ||
|
@@ -224,3 +277,82 @@ jobs: | |
run: | | ||
cat tarantool.log || true | ||
kill $(cat tarantool.pid) || true | ||
|
||
run_tests_with_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. | ||
# | ||
# 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-2022 | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
# Use reduced test matrix cause Windows pipelines are long. | ||
tarantool: | ||
- '2.10.0.g0a5ce0b9c-1' | ||
python: | ||
- '3.6' | ||
- '3.10' | ||
steps: | ||
- name: Clone the connector repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Remove connector source code (main folder) | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: tarantool | ||
|
||
- name: Remove connector source code (setup.py) | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: setup.py | ||
|
||
- name: Setup Python for tests | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install the package with pip | ||
run: pip install git+$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY@$env:GITHUB_REF_NAME | ||
|
||
- name: Install test requirements | ||
run: pip install -r requirements-test.txt | ||
|
||
- name: Setup WSL for tarantool | ||
uses: Vampire/setup-wsl@v1 | ||
with: | ||
distribution: Ubuntu-20.04 | ||
|
||
- name: Install tarantool ${{ matrix.tarantool }} for WSL | ||
shell: wsl-bash_Ubuntu-20.04 {0} | ||
run: | | ||
curl -L https://tarantool.io/release/2/installer.sh | bash -s | ||
sudo apt install -y tarantool=${{ matrix.tarantool }} tarantool-dev=${{ matrix.tarantool }} | ||
|
||
- 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: python -m unittest discover -v | ||
|
||
- name: Stop test tarantool instance | ||
if: ${{ always() }} | ||
shell: wsl-bash_Ubuntu-20.04 {0} | ||
run: | | ||
cat tarantool.log || true | ||
kill $(cat tarantool.pid) || true |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include README.rst | ||
include README.txt | ||
include setup.py | ||
recursive-include src/tarantool/ *.py | ||
recursive-include tarantool/ *.py |
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
Empty file.
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any restrictions on the python version on Windows? Does it need to be documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there are no restrictions, it's more like "test only minimal required" since Windows pipelines are rather long and GitHub provides less Windows runners than Linux runners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think then we need to add 3.6 (3.6, 3.10) since we claim it as a minimal supported version.
Anyway, a short comment will look good here, but up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good comment, added.