-
Notifications
You must be signed in to change notification settings - Fork 3
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 #12 from sbalian/maintenance
Maintenance
- Loading branch information
Showing
10 changed files
with
780 additions
and
181 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 |
---|---|---|
@@ -1,26 +1,23 @@ | ||
name: Upload Python Package | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
uses: actions/setup-python@v5 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
python-version: '3.10' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Build | ||
run: poetry build | ||
- name: Publish | ||
run: poetry publish |
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 |
---|---|---|
@@ -1,68 +1,49 @@ | ||
name: Testing, type checking and linting | ||
name: Tests | ||
|
||
on: [push] | ||
on: push | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Prepare | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run tests | ||
run: | | ||
tox -e py | ||
test-numpy: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
exclude: | ||
- os: macos-latest | ||
python-version: '3.11' | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Prepare | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Run tests | ||
run: | | ||
tox -e numpy | ||
- name: Check types | ||
run: | | ||
mkdir .mypy_cache | ||
tox -e mypy | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install the package (no lock file) | ||
run: rm poetry.lock && poetry install -E numpy | ||
- name: Run pytest | ||
run: QRANDOM_API_KEY=key poetry run pytest | ||
- name: Run mypy | ||
run: poetry run mypy --install-types --non-interactive . | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Prepare | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Lint | ||
run: | | ||
tox -e flake8,black,isort | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install the package | ||
run: poetry install -E numpy | ||
- name: Run black | ||
run: poetry run black --check . | ||
- name: Run isort | ||
run: poetry run isort --check . | ||
- name: Run flake8 | ||
run: poetry run flake8 |
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
*.pyc | ||
.tox/ | ||
dist/ | ||
*.egg-info/ | ||
TODO | ||
src/qrandom/version.py |
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
Oops, something went wrong.