Skip to content

Commit cef2d58

Browse files
committed
lint and test concurrently
1 parent ff4fedf commit cef2d58

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

.github/workflows/build_release.yml renamed to .github/workflows/test_release.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Release
1+
name: Test and Release
22

33
on:
44
pull_request:
@@ -7,9 +7,27 @@ on:
77
release:
88
types: [published]
99
push:
10+
paths:
11+
- 'src/**'
12+
- 'tests/**'
1013

1114
jobs:
12-
build:
15+
lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Setup Python
20+
uses: actions/setup-python@v1
21+
- name: Install Dependencies
22+
run: pip install tox
23+
- name: Flake8
24+
run: tox -e flake8
25+
- name: Black Check
26+
run: tox -e black-check
27+
- name: Pylint
28+
run: tox -e pylint
29+
30+
test:
1331
runs-on: ubuntu-latest
1432
steps:
1533
- uses: actions/checkout@v1
@@ -27,12 +45,6 @@ jobs:
2745
python-version: 3.7
2846
- name: Install Dependencies
2947
run: pip install tox
30-
- name: Flake8
31-
run: tox -e flake8
32-
- name: Black Check
33-
run: tox -e black-check
34-
- name: Pylint
35-
run: tox -e pylint
3648
# runs unit tests for each python version
3749
- name: Unit Tests
3850
run: tox -- tests/unit
@@ -57,7 +69,7 @@ jobs:
5769
CODECOV_UPLOAD_TOKEN: ${{ secrets.AWS_ACCESS_KEY_ID }}
5870

5971
release:
60-
needs: build
72+
needs: [test, lint]
6173
if: github.event_name == 'release' && github.repository == 'aws/sagemaker-experiments'
6274
runs-on: ubuntu-latest
6375
steps:

0 commit comments

Comments
 (0)