diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0b6eeb0..cb177c6 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,9 +5,12 @@ name: Run linter, tests, and upload coverage report on: push: - branches: [ '*' ] + branches: [ "*" ] pull_request: - branches: [ '*' ] + branches: [ "*" ] + +permissions: + contents: read jobs: build: @@ -16,18 +19,21 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + 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)" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 + pip install flake8 pytest pytest-cov if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Install package run: | @@ -40,7 +46,6 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest, generate coverage report run: | - pip install pytest pytest-cov pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3.1.1