-
Notifications
You must be signed in to change notification settings - Fork 94
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
1 parent
b351a48
commit 1774fda
Showing
1 changed file
with
50 additions
and
38 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 |
---|---|---|
|
@@ -11,11 +11,11 @@ on: | |
branches: | ||
- '**' # matches every branch | ||
|
||
#on: | ||
# push: | ||
# branches: [ master ] | ||
# pull_request: | ||
# branches: [ master ] | ||
|
||
permissions: | ||
contents: read # to fetch code | ||
actions: write # to cancel previous workflows | ||
|
||
|
||
|
||
jobs: | ||
|
@@ -24,9 +24,13 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11"] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
|
@@ -49,46 +53,54 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | ||
pip uninstall brainpy -y | ||
python setup.py install | ||
- name: Test with pytest | ||
run: | | ||
cd brainpy | ||
pytest _src/ | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | ||
pip uninstall brainpy -y | ||
python setup.py install | ||
- name: Test with pytest | ||
run: | | ||
cd brainpy | ||
pytest _src/ | ||
test_windows: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements-dev.txt | ||
pip uninstall brainpy -y | ||
python setup.py install | ||
- name: Test with pytest | ||
run: | | ||
cd brainpy | ||
pytest _src/ | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements-dev.txt | ||
pip uninstall brainpy -y | ||
python setup.py install | ||
- name: Test with pytest | ||
run: | | ||
cd brainpy | ||
pytest _src/ |