Skip to content

Commit

Permalink
Update build-and-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kunle009 committed May 1, 2024
1 parent 916fd78 commit 27e5fff
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: build & test

on: [pull_request, push, workflow_dispatch]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ${{ matrix.os }}
build:

runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests
run: pytest
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install scipy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest Testing

0 comments on commit 27e5fff

Please sign in to comment.