-
Notifications
You must be signed in to change notification settings - Fork 11
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 #16 from ocefpaf/GHA
Update GHA
- Loading branch information
Showing
12 changed files
with
293 additions
and
169 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,11 @@ | ||
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "Bot" |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
packages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
shell: bash | ||
|
||
- name: Install build tools | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine | ||
shell: bash | ||
|
||
- name: Build binary wheel | ||
run: python -m build --sdist --wheel . --outdir dist | ||
|
||
- name: CheckFiles | ||
run: | | ||
ls dist | ||
shell: bash | ||
|
||
- name: Test wheels | ||
run: | | ||
cd dist && python -m pip install *.whl | ||
python -m twine check * | ||
shell: bash | ||
|
||
- name: Publish a Python distribution to PyPI | ||
if: success() && github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
environment-file: false | ||
|
||
- name: Python ${{ matrix.python-version }} | ||
shell: bash -l {0} | ||
run: > | ||
micromamba create --name TEST python=${{ matrix.python-version }} pytest --file requirements.txt --channel conda-forge | ||
&& micromamba activate TEST | ||
&& python -m pip install -e . --no-deps --force-reinstall | ||
- name: Tests | ||
shell: bash -l {0} | ||
run: > | ||
micromamba activate TEST | ||
&& python -m pytest -rxs tests/ |
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,49 @@ | ||
exclude: cmcrameri/cmaps | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: check-docstring-first | ||
- id: check-added-large-files | ||
- id: requirements-txt-fixer | ||
- id: file-contents-sorter | ||
files: requirements-dev.txt | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.254 | ||
hooks: | ||
- id: ruff | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
|
||
- repo: https://github.com/keewis/blackdoc | ||
rev: v0.3.8 | ||
hooks: | ||
- id: blackdoc | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list=buda | ||
|
||
ci: | ||
autofix_commit_msg: | | ||
[pre-commit.ci] auto fixes from pre-commit.com hooks | ||
for more information, see https://pre-commit.ci | ||
autofix_prs: false | ||
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' | ||
autoupdate_schedule: monthly | ||
skip: [] | ||
submodules: false |
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
Oops, something went wrong.