-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GitHub Actions. * Fix path. * Remove minimal configuration (no optional dependencies). * Disable Windows CI. * Update codecov action. * Ignore coverage of templates. * Remove CircleCI. * Update changelog. * Update changelog.
- Loading branch information
Showing
8 changed files
with
164 additions
and
271 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,18 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test-sdist-and-wheels: | ||
uses: ./.github/workflows/publish-packages.yml | ||
with: | ||
upload_to_test: false | ||
secrets: | ||
PYPI_API_TOKEN: ${{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Publish to TestPyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release/*.*.*' | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test-sdist-and-wheels: | ||
uses: ./.github/workflows/publish-packages.yml | ||
with: | ||
upload_to_test: true | ||
secrets: | ||
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Publish packages | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
upload_to_test: | ||
required: true | ||
type: boolean | ||
secrets: | ||
TEST_PYPI_API_TOKEN: | ||
required: false | ||
PYPI_API_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
# We must explicitly install the requirements so that we can force | ||
# installation of the local wheel below in case the version conflicts | ||
# with published wheels (typically only possible during testing). | ||
python -m pip install \ | ||
-r requirements.txt \ | ||
-r requirements-test.txt | ||
- name: Install pypa/build | ||
run: | ||
python -m pip install build | ||
- name: Build a binary wheel and a source tarball | ||
run: | ||
python -m build --sdist --wheel --outdir dist/ . | ||
- name: Install wheel | ||
run: | ||
python -m pip install signac-flow --progress-bar off --no-index -f dist/ | ||
- name: Test with pytest | ||
run: | ||
python -m pytest -v tests/ | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release | ||
path: dist/ | ||
|
||
publish: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: release | ||
path: dist/ | ||
- name: Publish package to TestPyPI | ||
if: ${{ inputs.upload_to_test }} | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
- name: Publish package to PyPI | ||
if: ${{ !inputs.upload_to_test }} | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
Oops, something went wrong.