-
Notifications
You must be signed in to change notification settings - Fork 5
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
57ffe24
commit e95b3f5
Showing
2 changed files
with
89 additions
and
81 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,89 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "develop" | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "develop" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
# needed by coveralls | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build_sdist: | ||
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions\setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U wheel | ||
pip install -r requirements_setup.txt | ||
pip install -r requirements.txt | ||
pip install -r requirements_test.txt | ||
pip install coveralls>=3.0.0 | ||
- name: Build sdist | ||
run: | | ||
python setup.py sdist --formats=gztar bdist_wheel -d dist | ||
- name: Run tests | ||
run: | | ||
python -m pytest --cov anaflow --cov-report term-missing -v tests/ | ||
python -m coveralls --service=github | ||
- uses: actions/upload-artifact@v2 | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | ||
with: | ||
path: dist | ||
|
||
upload_to_pypi: | ||
needs: [build_sdist] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish to Test PyPI | ||
# only if working on develop | ||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.test_pypi_password }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
|
||
- name: Publish to PyPI | ||
# only if tagged | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.