remove makefile #117
Workflow file for this run
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
--- | |
on: | |
push: | |
branches: | |
- main | |
- maint/* | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
- maint/* | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3 | |
- run: pip install --upgrade build twine | |
- name: Build sdist and wheel | |
run: python -m build | |
- run: twine check dist/* | |
- name: Upload sdist and wheel artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
- name: Build git archive | |
run: mkdir archive && git archive -v -o archive/archive.tgz HEAD | |
- name: Upload git archive artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: archive | |
path: archive/ | |
test-package: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
matrix: | |
package: [wheel, sdist, archive] | |
steps: | |
- name: Download sdist and wheel artifacts | |
if: matrix.package != 'archive' | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
- name: Download git archive artifact | |
if: matrix.package == 'archive' | |
uses: actions/download-artifact@v3 | |
with: | |
name: archive | |
path: archive/ | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3 | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Update pip | |
run: pip install --upgrade pip | |
- name: Install wheel | |
if: matrix.package == 'wheel' | |
run: pip install dist/*.whl | |
- name: Install sdist | |
if: matrix.package == 'sdist' | |
run: pip install dist/*.tar.gz | |
- name: Install archive | |
if: matrix.package == 'archive' | |
run: pip install archive/archive.tgz | |
test-coverage: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v2 | |
name: Set up Python ${{ matrix.python-version }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip | |
- name: Install task package | |
run: pip install -e .[test] | |
- name: Test with pytest | |
run: pytest --cov=giga_connectome --cov-report=xml --doctest-modules -v --pyargs giga_connectome | |
- uses: codecov/codecov-action@v3 | |
if: ${{ always() }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: [test-package, test-coverage] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |