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