forked from great-expectations/great_expectations
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.32 KB
/
test-pep273-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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@v3
- name: Setup Python
uses: actions/setup-python@v2
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