From 911dd8fe705aa29cad450a16f715a7a285178c51 Mon Sep 17 00:00:00 2001 From: Guillaume Ludinard Date: Sun, 26 Sep 2021 17:39:45 +0900 Subject: [PATCH] Trying to lint during pull request --- .github/workflows/tests.yml | 39 ++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b7d55383..ff86873f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,9 +7,36 @@ on: branches: [ master ] jobs: - tests: + + lint: runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.6' + architecture: 'x64' + + - name: Install Pipenv + run: python -m pip install pipenv wheel + + - name: Cache Pipenv + uses: actions/cache@v1 + with: + path: ~/.local/share/virtualenvs + key: "{{ runner.os }}-pipenv-{{ hashFIles('**/Pipfile.lock') }}" + + - name: Install dependencies + if: steps.cache-pipenv.outputs.cache-hit != 'true' + + run: pipenv install --deploy --dev + - name: Running Pylint + run: pipenv run pylint + tests: + needs: lint + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.x @@ -19,8 +46,7 @@ jobs: architecture: 'x64' - name: Install Pipenv - run: | - python -m pip install pipenv wheel + run: python -m pip install pipenv wheel - name: Cache Pipenv uses: actions/cache@v1 @@ -30,9 +56,8 @@ jobs: - name: Install dependencies if: steps.cache-pipenv.outputs.cache-hit != 'true' - run: | - pipenv install --deploy --dev + run: pipenv install --deploy --dev - name: Running Pytest - run: | - pipenv run pytest + run: pipenv run pytest +