@@ -2,85 +2,82 @@ 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 :
11
11
if : github.event.pull_request.head.repo.full_name == github.repository
12
12
13
13
runs-on : ubuntu-latest
14
14
strategy :
15
+ max-parallel : 1
15
16
matrix :
16
17
# TODO: unlock parallel testing by using more API keys
17
- python-test-info :
18
- python-version : [3.6, 3.7, 3.8]
19
- python-prod-key : [${{ secrets.LABELBOX_API_KEY}}, ${{ secrets.PROD_LABELBOX_API_KEY_2}},${{ secrets.PROD_LABELBOX_API_KEY_3}}]
20
- python-staging-key : [${{ secrets.STAGING_LABELBOX_API_KEY}}, ${{ secrets.STAGING_LABELBOX_API_KEY_2}},${{ secrets.STAGING_LABELBOX_API_KEY_3}}]
18
+ python-version : [3.6, 3.7, 3.8]
21
19
22
20
steps :
21
+ - name : Cancel previous workflow
22
+ uses : styfle/cancel-workflow-action@0.4.0
23
+ with :
24
+ access_token : ${{ github.token }}
23
25
24
- - name : Cancel previous workflow
25
- uses : styfle/cancel-workflow-action@0.4.0
26
- with :
27
- access_token : ${{ github.token }}
28
-
29
- - name : set environment for branch
30
- run : |
26
+ - name : set environment for branch
27
+ run : |
31
28
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
32
29
echo "LABELBOX_TEST_ENVIRON=prod" >> $GITHUB_ENV
33
30
else
34
31
echo "LABELBOX_TEST_ENVIRON=staging" >> $GITHUB_ENV
35
32
fi
36
33
37
- - uses : actions/checkout@v2
38
- with :
39
- token : ${{ secrets.ACTIONS_ACCESS_TOKEN }}
40
- ref : ${{ github.head_ref }}
34
+ - uses : actions/checkout@v2
35
+ with :
36
+ token : ${{ secrets.ACTIONS_ACCESS_TOKEN }}
37
+ ref : ${{ github.head_ref }}
41
38
42
- - name : Set up Python ${{ matrix.python-test-info .python-version }}
43
- uses : actions/setup-python@v2
44
- with :
45
- python-version : ${{ matrix.python-test-info .python-version }}
39
+ - name : Set up Python ${{ matrix.python-version }}
40
+ uses : actions/setup-python@v2
41
+ with :
42
+ python-version : ${{ matrix.python-version }}
46
43
47
- - name : yapf
48
- id : yapf
49
- uses : AlexanderMelde/yapf-action@master
50
- with :
51
- args : --verbose --recursive --parallel --style "google"
52
- - name : dependencies
53
- run : |
54
- sudo apt-get -y update
55
- sudo apt install -y libsm6 \
56
- libxext6 \
57
- ffmpeg \
58
- libfontconfig1 \
59
- libxrender1 \
60
- libgl1-mesa-glx
61
- - name : install labelbox package
62
- run : |
63
- python -m pip install --upgrade pip
64
- python -m pip install .
65
- - name : mypy
66
- run : |
67
- pip install mypy==0.782
68
- mypy -p labelbox --pretty --show-error-codes
69
- - name : Install package and test dependencies
70
- run : |
71
- pip install tox==3.18.1
44
+ - name : yapf
45
+ id : yapf
46
+ uses : AlexanderMelde/yapf-action@master
47
+ with :
48
+ args : --verbose --recursive --parallel --style "google"
49
+ - name : dependencies
50
+ run : |
51
+ sudo apt-get -y update
52
+ sudo apt install -y libsm6 \
53
+ libxext6 \
54
+ ffmpeg \
55
+ libfontconfig1 \
56
+ libxrender1 \
57
+ libgl1-mesa-glx
58
+ - name : install labelbox package
59
+ run : |
60
+ python -m pip install --upgrade pip
61
+ python -m pip install .
62
+ - name : mypy
63
+ run : |
64
+ pip install mypy==0.782
65
+ mypy -p labelbox --pretty --show-error-codes
66
+ - name : Install package and test dependencies
67
+ run : |
68
+ pip install tox==3.18.1
72
69
73
- # TODO: replace tox.ini with what the Makefile does
74
- # to make sure local testing is
75
- # identical to github actions which uses tox.ini
76
- - name : Test with tox
77
- env :
78
- # make sure to tell tox to use these environs in tox.ini
79
- #
80
- # msokoloff+prod-python@labelbox.com
81
- LABELBOX_TEST_API_KEY_PROD : ${{ matrix.python-test-info.python-prod-key }}
70
+ # TODO: replace tox.ini with what the Makefile does
71
+ # to make sure local testing is
72
+ # identical to github actions which uses tox.ini
73
+ - name : Test with tox
74
+ env :
75
+ # make sure to tell tox to use these environs in tox.ini
76
+ #
77
+ # msokoloff+prod-python@labelbox.com
78
+ LABELBOX_TEST_API_KEY_PROD : ${{ secrets.LABELBOX_API_KEY }}
82
79
83
- # randall+staging-python@labelbox.com
84
- LABELBOX_TEST_API_KEY_STAGING : ${{ matrix.python-test-info.python-staging-key }}
85
- run : |
86
- tox -e py -- -svvx
80
+ # randall+staging-python@labelbox.com
81
+ LABELBOX_TEST_API_KEY_STAGING : ${{ secrets.STAGING_LABELBOX_API_KEY }}
82
+ run : |
83
+ tox -e py -- -svvx
0 commit comments