-
Couldn't load subscription status.
- Fork 412
Port python deps setup to mac #270
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
Changes from all commits
c860191
8e516b1
04f2f60
2391771
ce8418a
1c78971
bf20a55
e23b3ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| name: Test Python Package Installation on Linux and Mac | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, v1] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
|
|
||
| test-setup-python-scripts: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| include: | ||
| - test_dir: python-setup/tests/pipenv/requests-2 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2 | ||
| - test_dir: python-setup/tests/pipenv/requests-3 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3 | ||
|
|
||
| - test_dir: python-setup/tests/poetry/requests-2 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2 | ||
| - test_dir: python-setup/tests/poetry/requests-3 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3 | ||
|
|
||
| - test_dir: python-setup/tests/requirements/requests-2 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2 | ||
| - test_dir: python-setup/tests/requirements/requests-3 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3 | ||
|
|
||
| - test_dir: python-setup/tests/setup_py/requests-2 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 2 | ||
| - test_dir: python-setup/tests/setup_py/requests-3 | ||
| test_script: $GITHUB_WORKSPACE/python-setup/tests/check_requests_123.sh 3 | ||
|
|
||
| # This one shouldn't fail, but also won't install packages | ||
| - test_dir: python-setup/tests/requirements/non-standard-location | ||
| test_script: test -z $LGTM_INDEX_IMPORT_PATH | ||
|
|
||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v1 | ||
| with: | ||
| languages: python | ||
|
|
||
| - name: Test Auto Package Installation | ||
| run: | | ||
| set -x | ||
| $GITHUB_WORKSPACE/python-setup/install_tools.sh | ||
|
|
||
| cd $GITHUB_WORKSPACE/${{ matrix.test_dir }} | ||
|
|
||
| case ${{ matrix.os }} in | ||
| ubuntu-latest*) basePath="/opt";; | ||
| macos-latest*) basePath="/Users/runner";; | ||
| esac | ||
| echo ${basePath} | ||
|
|
||
| find ${basePath}/hostedtoolcache/CodeQL -path "*x64/codeql" -exec $GITHUB_WORKSPACE/python-setup/auto_install_packages.py {} \; | ||
| - name: Setup for extractor | ||
| run: | | ||
| echo $CODEQL_PYTHON | ||
| # only run if $CODEQL_PYTHON is set | ||
| if [ ! -z $CODEQL_PYTHON ]; then | ||
| $GITHUB_WORKSPACE/python-setup/tests/from_python_exe.py $CODEQL_PYTHON; | ||
| fi | ||
| - name: Verify packages installed | ||
| run: | | ||
| ${{ matrix.test_script }} | ||
|
|
||
| test-setup-python-scripts-windows: | ||
| runs-on: windows-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - test_dir: python-setup/tests/pipenv/requests-2 | ||
| python_version: 2 | ||
| - test_dir: python-setup/tests/pipenv/requests-3 | ||
| python_version: 3 | ||
|
|
||
| - test_dir: python-setup/tests/poetry/requests-2 | ||
| python_version: 2 | ||
| - test_dir: python-setup/tests/poetry/requests-3 | ||
| python_version: 3 | ||
|
|
||
| - test_dir: python-setup/tests/requirements/requests-2 | ||
| python_version: 2 | ||
| - test_dir: python-setup/tests/requirements/requests-3 | ||
| python_version: 3 | ||
|
|
||
| - test_dir: python-setup/tests/setup_py/requests-2 | ||
| python_version: 2 | ||
| - test_dir: python-setup/tests/setup_py/requests-3 | ||
| python_version: 3 | ||
|
|
||
| steps: | ||
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v1 | ||
| with: | ||
| languages: python | ||
|
|
||
| - name: Test Auto Package Installation | ||
| run: | | ||
| $cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\install_tools.ps1" | ||
| powershell -File $cmd | ||
|
|
||
| cd $Env:GITHUB_WORKSPACE\\${{ matrix.test_dir }} | ||
| py -3 $Env:GITHUB_WORKSPACE\\python-setup\\auto_install_packages.py C:\\hostedtoolcache\\windows\\CodeQL\\0.0.0-20200826\\x64\\codeql | ||
| - name: Setup for extractor | ||
| run: | | ||
| echo $Env:CODEQL_PYTHON | ||
|
|
||
| py -3 $Env:GITHUB_WORKSPACE\\python-setup\\tests\\from_python_exe.py $Env:CODEQL_PYTHON | ||
| - name: Verify packages installed | ||
| run: | | ||
| $cmd = $Env:GITHUB_WORKSPACE + "\\python-setup\\tests\\check_requests_123.ps1" | ||
| powershell -File $cmd ${{ matrix.python_version }} | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Could we move the windows job here too? So that we have all these workflows in one place?
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.
Windows jobs are completely different, I prefer to have them separated.
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 realize my comment might have been ambiguous. Ok if you prefer to keep it separate, but let me clarify below.
I am suggesting you copy the job from the
python-deps-windows.ymlworkflow file into this workflow file, not that you combine the jobs directly, as indeed they are very different. You would still have one job for both linux and mac, and one job for windows (e.g.,test-setup-python-scriptsandtest-setup-python-scripts-win). However, since they both test the python dependencies, I would have put them in the same file.