From 0b19b7a62e490c065e50ba56a050029a7a7d8e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Wed, 13 May 2020 13:23:10 +0200 Subject: [PATCH] ci: split Python workflow to enhance DX --- .github/workflows/{pythonapp.yml => i18n.yml} | 9 +------- .github/workflows/pylint.yml | 21 ++++++++++++++++++ .github/workflows/unit-tests.yml | 22 +++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) rename .github/workflows/{pythonapp.yml => i18n.yml} (78%) create mode 100644 .github/workflows/pylint.yml create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/i18n.yml similarity index 78% rename from .github/workflows/pythonapp.yml rename to .github/workflows/i18n.yml index dcb5610..086378a 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/i18n.yml @@ -1,4 +1,4 @@ -name: Python application +name: Internationalization check on: [push, pull_request] @@ -16,13 +16,6 @@ jobs: run: | pip install --upgrade pip pipenv pipenv sync -d - - name: Unit tests - run: | - pipenv run python -m coverage run -m unittest test - pipenv run codecov --token=${{ secrets.CODECOV_TOKEN }} - - name: Lint - run: | - pipenv run pylint kosmorro *.py kosmorrolib/*.py - name: Check i18n run: | pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..4cbb641 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,21 @@ +name: PyLint + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + pip install --upgrade pip pipenv + pipenv sync -d + - name: Lint + run: | + pipenv run pylint kosmorro *.py kosmorrolib/*.py diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..b1198d1 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,22 @@ +name: Unit tests + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + pip install --upgrade pip pipenv + pipenv sync -d + - name: Unit tests + run: | + pipenv run python -m coverage run -m unittest test + pipenv run codecov --token=${{ secrets.CODECOV_TOKEN }}