diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ba8367c7..b7bcd108 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -5,21 +5,30 @@ # # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Push-Checks +name: PR-Checks on: - push: + pull_request: branches: [ develop ] jobs: - build: - + flake8: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + -name: Checkout commits + uses: actions/checkout@v2 with: fetch-depth: 0 + -name: Checkout base ref + uses: actions/checkout@v2 + with: + ref: ${{github.base_ref}} + -name: Checkout head of PR + uses: actions/checkout@v2 + with: + ref: ${{github.head_ref}} + - name: Set up Python 3.7 uses: actions/setup-python@v2 with: @@ -29,26 +38,13 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + - name: Lint with flake8 env: - ROOT_SHA: ${{github.base_ref}} - + BASE_REF: ${{github.base_ref}} + run: | - DATA=$(python3 <