Skip to content

Commit

Permalink
Add new workflow to check for coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
joce committed Nov 15, 2023
1 parent 9db56d0 commit 11769a8
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 30 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt isort black flake8 pylint pyright
- name:
Checking imports with isort
# change to python 3.12 when isort supports it
run: |
isort -c --profile black --python-version 3 .
- name: Checking formatting with black
run: |
black --check --target-version py312 .
- name: Checking style with flake8
run: |
flake8 .
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
- name: Analaysing typing with pyright
run: |
pyright --version ${{ matrix.python-version }}
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: true
job-summary: true
custom-arguments: "-q"
click-to-expand: true
report-title: "Test Report"
26 changes: 0 additions & 26 deletions .github/workflows/pylint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Pylint](https://github.com/joce/stockyard/actions/workflows/pylint.yml/badge.svg)](https://github.com/joce/stockyard/actions/workflows/pylint.yml)
[![CI](https://github.com/joce/stockyard/actions/workflows/ci.yml/badge.svg)](https://github.com/joce/stockyard/actions/workflows/ci.yml)

# stockyard

Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
black >= 23.10
pylint >= 3.0
pyright >= 1.1.335
#pylint >= 3.0 # not required
#pyright >= 1.1.335 # not required
pytest >= 7.4
requests >= 2.31
textual >= 0.40
Expand Down

0 comments on commit 11769a8

Please sign in to comment.