Skip to content

Commit

Permalink
github workflows updated, small tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bgalek committed Jan 18, 2024
1 parent ce23e5d commit 1ac5638
Show file tree
Hide file tree
Showing 20 changed files with 777 additions and 132 deletions.
34 changes: 11 additions & 23 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
name: Pylint

on: [push]

on: [ pull_request ]
jobs:
build:

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
find . -name '*.py' -exec pylint {} --fail-under=8 \;
pylint_exit_code=$?
if [ $pylint_exit_code -ne 0 ]; then
echo "Pylint check failed with exit code $pylint_exit_code"
exit $pylint_exit_code
fi
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- uses: pr-annotators/pylint-pr-annotator@main
- name: Analysing the code with pylint
run: pylint $(git ls-files '*.py')
31 changes: 14 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
name: Test

on: [push]

on: [ pull_request ]
jobs:
build:

runs-on: ubuntu-latest

test:
strategy:
matrix:
# https://devguide.python.org/versions/
python: [ 3.11, 3.12 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Discover tests
run: |
echo "Starting discovery..."
python -m unittest discover -s "./_tests"
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Discover tests
run: python -m unittest discover -s ./_tests
5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1ac5638

Please sign in to comment.