Skip to content

Commit

Permalink
Adding pyproject.toml and using ruff to format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
josephnowak committed Oct 16, 2024
1 parent 6e8e11e commit 6842b68
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,21 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package

name: Python application

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

permissions:
contents: read
on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.11 ]
python-version: ["3.11"]

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 ruff pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
ruff check
- name: Test with pytest
run: |
pytest --cov
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"

0 comments on commit 6842b68

Please sign in to comment.