Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ebellocchia committed Nov 18, 2023
1 parent ee1307a commit c59d9a8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies and run code analysis tools

name: Code Analysis

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run code analysis
run: |
# Run isort
isort --check-only --diff .
# Run flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Run mypy
mypy .
# Run prospector
prospector .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will install Python dependencies, run tests with coverage and upload it to Codecov
# This workflow will install Python dependencies, run tests with code coverage and upload the results to Codecov

name: Code Coverage

Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/lint-test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will install Python dependencies and run tests with different Python versions

name: Linting and Testing
name: Testing

on:
push:
Expand All @@ -10,13 +10,11 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -28,13 +26,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Code linting
run: |
# Run isort
isort --check-only --diff .
# Run flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Code testing
run: |
pytest

0 comments on commit c59d9a8

Please sign in to comment.