From 6842b689d09abf28ac8408d43d96f993218703da Mon Sep 17 00:00:00 2001 From: Joseph Gonzalez Date: Wed, 16 Oct 2024 19:31:52 -0400 Subject: [PATCH] Adding pyproject.toml and using ruff to format the code --- .github/workflows/python-app.yml | 40 +++++++++----------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b36a651..17d00a0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,16 +1,6 @@ -# 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: @@ -18,22 +8,14 @@ jobs: 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)" \ No newline at end of file