-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |