@@ -2,9 +2,9 @@ name: Labelbox Python SDK
22
33on :
44 push :
5- branches : [ develop, master ]
5+ branches : [develop, master]
66 pull_request :
7- branches : [ develop, master ]
7+ branches : [develop, master]
88
99jobs :
1010 build :
@@ -17,79 +17,77 @@ jobs:
1717 # TODO: unlock parallel testing by using more API keys
1818 python-version : [3.6, 3.7, 3.8]
1919 include :
20- -python-version : 3.6
20+ - python-version : 3.6
2121 prod-key : LABELBOX_API_KEY
2222 staging-key : STAGING_LABELBOX_API_KEY
23- -python-version : 3.7
23+ - python-version : 3.7
2424 prod-key : PROD_LABELBOX_API_KEY_2
2525 staging-key : STAGING_LABELBOX_API_KEY_2
26- -python-version : 3.8
26+ - python-version : 3.8
2727 prod-key : PROD_LABELBOX_API_KEY_3
28- staging-key : STAGING_LABELBOX_API_KEY_2
29-
28+ staging-key : STAGING_LABELBOX_API_KEY_3
3029
3130 steps :
31+ - name : Cancel previous workflow
32+ uses : styfle/cancel-workflow-action@0.4.0
33+ with :
34+ access_token : ${{ github.token }}
3235
33- - name : Cancel previous workflow
34- uses : styfle/cancel-workflow-action@0.4.0
35- with :
36- access_token : ${{ github.token }}
37-
38- - name : set environment for branch
39- run : |
36+ - name : set environment for branch
37+ run : |
4038 if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
4139 echo "LABELBOX_TEST_ENVIRON=prod" >> $GITHUB_ENV
4240 else
4341 echo "LABELBOX_TEST_ENVIRON=staging" >> $GITHUB_ENV
4442 fi
4543
46- - uses : actions/checkout@v2
47- with :
48- token : ${{ secrets.ACTIONS_ACCESS_TOKEN }}
49- ref : ${{ github.head_ref }}
44+ - uses : actions/checkout@v2
45+ with :
46+ token : ${{ secrets.ACTIONS_ACCESS_TOKEN }}
47+ ref : ${{ github.head_ref }}
5048
51- - name : Set up Python ${{ matrix.python-version }}
52- uses : actions/setup-python@v2
53- with :
54- python-version : ${{ matrix.python-version }}
49+ - name : Set up Python ${{ matrix.python-version }}
50+ uses : actions/setup-python@v2
51+ with :
52+ python-version : ${{ matrix.python-version }}
5553
56- - name : yapf
57- id : yapf
58- uses : AlexanderMelde/yapf-action@master
59- with :
60- args : --verbose --recursive --parallel --style "google"
61- - name : dependencies
62- run : |
63- sudo apt-get -y update
64- sudo apt install -y libsm6 \
65- libxext6 \
66- ffmpeg \
67- libfontconfig1 \
68- libxrender1 \
69- libgl1-mesa-glx
70- - name : install labelbox package
71- run : |
72- python -m pip install --upgrade pip
73- python -m pip install .
74- - name : mypy
75- run : |
76- pip install mypy==0.782
77- mypy -p labelbox --pretty --show-error-codes
78- - name : Install package and test dependencies
79- run : |
80- pip install tox==3.18.1
54+ - name : yapf
55+ id : yapf
56+ uses : AlexanderMelde/yapf-action@master
57+ with :
58+ args : --verbose --recursive --parallel --style "google"
59+ - name : dependencies
60+ run : |
61+ sudo apt-get -y update
62+ sudo apt install -y libsm6 \
63+ libxext6 \
64+ ffmpeg \
65+ libfontconfig1 \
66+ libxrender1 \
67+ libgl1-mesa-glx
68+ - name : install labelbox package
69+ run : |
70+ python -m pip install --upgrade pip
71+ python -m pip install .
72+ - name : mypy
73+ run : |
74+ pip install mypy==0.782
75+ mypy -p labelbox --pretty --show-error-codes
76+ - name : Install package and test dependencies
77+ run : |
78+ pip install tox==3.18.1
8179
82- # TODO: replace tox.ini with what the Makefile does
83- # to make sure local testing is
84- # identical to github actions which uses tox.ini
85- - name : Test with tox
86- env :
87- # make sure to tell tox to use these environs in tox.ini
88- #
89- # msokoloff+prod-python@labelbox.com
90- LABELBOX_TEST_API_KEY_PROD : ${{ secrets.[matrix.prod-key]}}
80+ # TODO: replace tox.ini with what the Makefile does
81+ # to make sure local testing is
82+ # identical to github actions which uses tox.ini
83+ - name : Test with tox
84+ env :
85+ # make sure to tell tox to use these environs in tox.ini
86+ #
87+ # msokoloff+prod-python@labelbox.com
88+ LABELBOX_TEST_API_KEY_PROD : ${{ secrets.[matrix.prod-key]}}
9189
92- # randall+staging-python@labelbox.com
93- LABELBOX_TEST_API_KEY_STAGING : ${{ secrets.[matrix.staging-key]}}
94- run : |
95- tox -e py -- -svvx
90+ # randall+staging-python@labelbox.com
91+ LABELBOX_TEST_API_KEY_STAGING : ${{ secrets.[matrix.staging-key]}}
92+ run : |
93+ tox -e py -- -svvx
0 commit comments