Skip to content

Commit

Permalink
Update workflows to separate linting from testing
Browse files Browse the repository at this point in the history
  • Loading branch information
samwedge committed Jan 15, 2021
1 parent 32ed097 commit 2c78ca8
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 68 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@ on:

jobs:

submit-coverage:
name: Submit test coverage
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Generate test coverage report
run: poetry run coverage run --source=rapiduino -m pytest tests
- name: Submit test coverage report
uses: AndreMiras/coveralls-python-action@develop
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run type checking
run: poetry run mypy rapiduino
- name: Run linting
run: poetry run flake8 rapiduino
27 changes: 6 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,14 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run tests
- name: Generate test coverage report
run: poetry run coverage run --source=rapiduino -m pytest tests
- name: Run tests and publish coverage
run: poetry run pytest tests
- name: Submit test coverage report
if: ${{ matrix.python-version }} == 3.9
uses: AndreMiras/coveralls-python-action@develop
- name: Run type checking
run: poetry run mypy rapiduino
- name: Run linting
run: poetry run flake8 rapiduino

submit-coverage:
name: Submit test coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Generate test coverage report
run: poetry run coverage run --source=rapiduino -m pytest tests
- name: Submit test coverage report
uses: AndreMiras/coveralls-python-action@develop
Loading

0 comments on commit 2c78ca8

Please sign in to comment.