From cef2d5851efb3c2d87dd4c0e68b3dd81fefbfabb Mon Sep 17 00:00:00 2001 From: Dana Benson Date: Thu, 30 Jan 2020 16:10:54 -0800 Subject: [PATCH] lint and test concurrently --- .../{build_release.yml => test_release.yml} | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) rename .github/workflows/{build_release.yml => test_release.yml} (90%) diff --git a/.github/workflows/build_release.yml b/.github/workflows/test_release.yml similarity index 90% rename from .github/workflows/build_release.yml rename to .github/workflows/test_release.yml index 1d41025..0d48a8e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/test_release.yml @@ -1,4 +1,4 @@ -name: Build and Release +name: Test and Release on: pull_request: @@ -7,9 +7,27 @@ on: release: types: [published] push: + paths: + - 'src/**' + - 'tests/**' jobs: - build: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup Python + uses: actions/setup-python@v1 + - name: Install Dependencies + run: pip install tox + - name: Flake8 + run: tox -e flake8 + - name: Black Check + run: tox -e black-check + - name: Pylint + run: tox -e pylint + + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -27,12 +45,6 @@ jobs: python-version: 3.7 - name: Install Dependencies run: pip install tox - - name: Flake8 - run: tox -e flake8 - - name: Black Check - run: tox -e black-check - - name: Pylint - run: tox -e pylint # runs unit tests for each python version - name: Unit Tests run: tox -- tests/unit @@ -57,7 +69,7 @@ jobs: CODECOV_UPLOAD_TOKEN: ${{ secrets.AWS_ACCESS_KEY_ID }} release: - needs: build + needs: [test, lint] if: github.event_name == 'release' && github.repository == 'aws/sagemaker-experiments' runs-on: ubuntu-latest steps: