-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Azure Pipeline with GitHub actions (#179)
* test numpy thing * add typechecking action * add codecov to test action * fix * refactoring * grr * forgot pydantic * remove tests on windows * more dependencies * remove typechecking from Azure pipeline * get codecov to wait for more results before reporting * add notebook tests to testing action * also install docs dependencies... * fix path * build dist and publish to PyPI if release * use py3.9 * remove azure pipeline, everything is handled by GitHub actions now * change to bitarray, tidying * remove unused packages * remove unused packages * adjust docs * Revert "refactoring" This reverts commit 10d624f.
- Loading branch information
Showing
8 changed files
with
821 additions
and
891 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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build_dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install poetry | ||
shell: bash | ||
run: | | ||
curl -sSL -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | ||
python get-poetry.py -y | ||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Configure poetry | ||
shell: bash | ||
run: | | ||
poetry --version | ||
poetry config virtualenvs.in-project true | ||
- name: Set up cache | ||
uses: actions/cache@v2.1.6 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry install --no-interaction | ||
- name: Build package | ||
run: poetry build --no-interaction | ||
|
||
- name: Save artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: blocklib-dist | ||
path: ./dist | ||
|
||
upload_pypi: | ||
needs: [build_dist] | ||
runs-on: ubuntu-latest | ||
|
||
# upload to PyPI only on release | ||
if: github.event.release && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: blocklib-dist | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,31 @@ | ||
name: Typechecking | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
|
||
jobs: | ||
typechecking: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.x | ||
- name: mypy (pinned) | ||
run: | | ||
pip install --upgrade pip | ||
pip install -U mypy==0.931 | ||
pip install -U pydantic | ||
pip install -U types-setuptools | ||
mypy blocklib --ignore-missing-imports --no-implicit-optional --disallow-untyped-calls | ||
- name: mypy (latest) | ||
run: | | ||
pip install --upgrade pip | ||
pip install -U mypy | ||
pip install -U pydantic | ||
pip install -U types-setuptools | ||
mypy blocklib --ignore-missing-imports --no-implicit-optional --disallow-untyped-calls |
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 |
---|---|---|
|
@@ -16,4 +16,4 @@ comment: | |
# prevent premature reporting | ||
codecov: | ||
notify: | ||
after_n_builds: 2 | ||
after_n_builds: 6 |
Oops, something went wrong.