Test PEP 273 compatibility #6067
This file contains 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 PEP 273 compatibility | |
on: | |
pull_request_target: | |
types: | |
- opened | |
branches: | |
- "main" | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
run: | |
name: "[${{matrix.type}}, ${{matrix.os}}, py${{matrix.python}}]" | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
python: [3.7, 3.8, 3.9] | |
os: [ubuntu-20.04, windows-2019] | |
type: [directory, zip] | |
fail-fast: false | |
steps: | |
- name: Support longpaths | |
if: runner.os == 'Windows' | |
run: git config --system core.longpaths true | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{matrix.python}} | |
- name: Setup base system | |
run: | | |
pip install --upgrade wheel setuptools | |
pip install -r requirements.txt | |
- name: Install GE from sources into extra_libraries_dir | |
run: | | |
pip install . -t extra_libraries_dir | |
- name: Remove sources | |
shell: bash | |
run: | | |
rm -r ./great_expectations | |
- name: Generate extra_libraries.zip (Win) | |
if: | | |
runner.os == 'Windows' && | |
matrix.type == 'zip' | |
run: | | |
Compress-Archive -Path extra_libraries_dir\* -DestinationPath extra_libraries.zip | |
- name: Generate extra_libraries.zip (Linux) | |
if: | | |
runner.os == 'Linux' && | |
matrix.type == 'zip' | |
run: | | |
sudo apt-get install zip | |
(cd extra_libraries_dir && zip --quiet -r ../extra_libraries.zip ./) | |
- name: Remove the directory extra_libraries_dir | |
if: matrix.type == 'zip' | |
shell: bash | |
run: rm -r ./extra_libraries_dir | |
- name: Generate a $PYTHONPATH that includes the extra_libraries ${{matrix.type}} (to be used in the next step) | |
id: pythonpath-step | |
shell: bash | |
run: python -c 'import sys,os; print("::set-output name=pythonpath::"+os.pathsep.join(sys.path+(["extra_libraries.zip"] if "${{matrix.type}}"=="zip" else ["extra_libraries_dir"])))' | |
- name: Use Great Expectations in a script, when the GE library is installed in a ${{matrix.type}} | |
env: | |
PYTHONPATH: ${{steps.pythonpath-step.outputs.pythonpath}} | |
run: | | |
python ./tests/integration/common_workflows/simple_build_data_docs.py |