-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from MannLabs/development
Release 1.2.4
- Loading branch information
Showing
188 changed files
with
6,037 additions
and
8,206 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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# reusable workflow to run all tests | ||
name: run-tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
python-version: | ||
required: true | ||
type: string | ||
install-script: | ||
required: true | ||
type: string | ||
jobs: | ||
pre-commit: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: "latest" | ||
auto-update-conda: true | ||
python-version: ${{ inputs.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Perform pip installation with all stable dependencies | ||
shell: bash -l {0} | ||
run: | | ||
cd misc | ||
. ./${{ inputs.install-script }} | ||
- name: Install additional dependencies required for testing | ||
shell: bash -l {0} | ||
run: | | ||
conda activate alphabase | ||
pip install pytest nbmake==1.5.3 | ||
conda deactivate | ||
- name: Run tests | ||
shell: bash -l {0} | ||
run: | | ||
conda activate alphabase | ||
cd tests | ||
. ./run_tests.sh | ||
conda deactivate |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# checks to run on branches for each pull request | ||
name: branch-checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run all pre-commit hooks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] | ||
# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources. | ||
run-tests-loose: | ||
name: Test loose pip installation on ubuntu-latest | ||
needs: pre-commit | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
uses: ./.github/workflows/_run_tests.yml | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
os: ${{ matrix.os }} | ||
install-script: "loose_pip_install.sh" |
This file was deleted.
Oops, something went wrong.
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,64 +1,38 @@ | ||
# Perform pip installation and run all tests | ||
|
||
# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources. | ||
# On each push to develop, the whole test matrix runs, additionally, its success is mandatory for merging to main. | ||
# In the (assumed to be rare case) that these full matrix tests fail but the reduced matrix tests passed, | ||
# we will learn about it latest before pushing to main. The merge that caused the issue can then be identified | ||
# from the tests that ran on develop. | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, development ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
name: Default installation and tests | ||
name: Pip installation and tests | ||
|
||
jobs: | ||
stable_installation: | ||
name: Test stable pip installation on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Test pip installation with all stable dependencies | ||
shell: bash -l {0} | ||
run: | | ||
cd misc | ||
. ./stable_pip_install.sh | ||
- name: Unittests | ||
shell: bash -l {0} | ||
run: | | ||
conda activate alphabase | ||
nbdev_test | ||
conda deactivate | ||
uses: ./.github/workflows/_run_tests.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
python-version: ${{ matrix.python-version }} | ||
install-script: "stable_pip_install.sh" | ||
|
||
loose_installation: | ||
name: Test loose pip installation on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Test pip installation with all loose dependencies | ||
shell: bash -l {0} | ||
run: | | ||
cd misc | ||
. ./loose_pip_install.sh | ||
- name: Unittests | ||
shell: bash -l {0} | ||
run: | | ||
conda activate alphabase | ||
nbdev_test | ||
conda deactivate | ||
uses: ./.github/workflows/_run_tests.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
python-version: ${{ matrix.python-version }} | ||
install-script: "loose_pip_install.sh" |
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
on: | ||
# push: | ||
# branches: [ main ] | ||
workflow_dispatch: | ||
|
||
|
||
name: Publish on PyPi and release on GitHub | ||
|
||
jobs: | ||
Version_Bumped: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.master_version_bumped.outputs.version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Master version bumped | ||
id: master_version_bumped | ||
shell: bash -l {0} | ||
run: | | ||
cd misc | ||
. ./check_version.sh | ||
echo "version=${current_version}" >> $GITHUB_OUTPUT | ||
Create_PyPi_Release: | ||
runs-on: ubuntu-latest | ||
needs: Version_Bumped | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Prepare distribution | ||
shell: bash -l {0} | ||
run: | | ||
cd release/pypi | ||
. ./prepare_pypi_wheel.sh | ||
- name: Publish distribution to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_ALPHABASE_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
- name: Test PyPI test release | ||
shell: bash -l {0} | ||
run: | | ||
cd release/pypi | ||
. ./install_test_pypi_wheel.sh | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_ALPHABASE_API_TOKEN }} | ||
Test_PyPi_Release: | ||
name: Test_PyPi_version_on_${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
needs: Create_PyPi_Release | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Test pip installation from PyPi | ||
shell: bash -l {0} | ||
run: | | ||
cd release/pypi | ||
. ./install_pypi_wheel.sh |
Oops, something went wrong.