@@ -2,9 +2,9 @@ name: Labelbox Python SDK
2
2
3
3
on :
4
4
push :
5
- branches : [ develop, master ]
5
+ branches : [develop, master]
6
6
pull_request :
7
- branches : [ develop, master ]
7
+ branches : [develop, master]
8
8
9
9
jobs :
10
10
build :
@@ -17,79 +17,77 @@ jobs:
17
17
# TODO: unlock parallel testing by using more API keys
18
18
python-version : [3.6, 3.7, 3.8]
19
19
include :
20
- -python-version : 3.6
20
+ - python-version : 3.6
21
21
prod-key : LABELBOX_API_KEY
22
22
staging-key : STAGING_LABELBOX_API_KEY
23
- -python-version : 3.7
23
+ - python-version : 3.7
24
24
prod-key : PROD_LABELBOX_API_KEY_2
25
25
staging-key : STAGING_LABELBOX_API_KEY_2
26
- -python-version : 3.8
26
+ - python-version : 3.8
27
27
prod-key : PROD_LABELBOX_API_KEY_3
28
- staging-key : STAGING_LABELBOX_API_KEY_2
29
-
28
+ staging-key : STAGING_LABELBOX_API_KEY_3
30
29
31
30
steps :
31
+ - name : Cancel previous workflow
32
+ uses : styfle/cancel-workflow-action@0.4.0
33
+ with :
34
+ access_token : ${{ github.token }}
32
35
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 : |
40
38
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
41
39
echo "LABELBOX_TEST_ENVIRON=prod" >> $GITHUB_ENV
42
40
else
43
41
echo "LABELBOX_TEST_ENVIRON=staging" >> $GITHUB_ENV
44
42
fi
45
43
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 }}
50
48
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 }}
55
53
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
81
79
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]}}
91
89
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