Skip to content

Commit

Permalink
combine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Bchass committed May 27, 2024
1 parent 78e6628 commit f87f8d0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 48 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,50 @@ name: Python package

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

types: [opened, reopened, converted_to_draft, ready_for_review, synchronize]
branches:
- master
jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.10, 3.11, 3.12]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
- name: Install pytest
run: |
python -m pip install pytest
- name: Install pytest-cov
run: python -m pip install pytest-cov

- name: Run tests with Python ${{ matrix.python-version }}
run: |
pytest
python${{ matrix.python-version }} -m pytest --cov=tinynumpy/matrices --cov-report=xml tinynumpy/tests
39 changes: 0 additions & 39 deletions .github/workflows/test-actions.yml

This file was deleted.

0 comments on commit f87f8d0

Please sign in to comment.