-
Notifications
You must be signed in to change notification settings - Fork 25
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
Showing
21 changed files
with
167 additions
and
536 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -16,12 +16,10 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
@@ -31,17 +29,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install build dependencies | ||
run: python -m pip install setuptools setuptools-scm wheel Cython numpy scikit-learn | ||
- name: Build sdist | ||
run: python setup.py sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
@@ -55,12 +50,11 @@ jobs: | |
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.GH_TESTPYPI_UPLOAD }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist, upload_testpypi] | ||
|
@@ -71,8 +65,7 @@ jobs: | |
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.GH_PYPI_UPLOAD }} |
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 |
---|---|---|
|
@@ -2,62 +2,76 @@ name: CI | |
on: [push] | ||
|
||
jobs: | ||
linter: | ||
name: "Linter (pre-commit)" | ||
pre-commit-checks: | ||
name: Linux - pre-commit checks - Python 3.10 | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: True | ||
strategy: | ||
fail-fast: true | ||
PRE_COMMIT_USE_MICROMAMBA: 1 | ||
steps: | ||
- name: Pull image | ||
run: docker pull condaforge/mambaforge:latest | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Run linter inside of container | ||
uses: ./.github/actions/linter | ||
linux: | ||
name: "Linux - tests - Py${{ matrix.PYTHON_VERSION }}" | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: True | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
PYTHON_VERSION: ['3.8', '3.9', '3.10'] | ||
steps: | ||
- name: Pull image | ||
run: docker pull condaforge/mambaforge:latest | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Run CI inside of container | ||
uses: ./.github/actions/unittests | ||
with: | ||
python_version: ${{ matrix.PYTHON_VERSION }} | ||
linux-conda-build: | ||
name: "Linux - conda-build - Python ${{ matrix.CONDA_BUILD_YML }}" | ||
runs-on: ubuntu-latest | ||
- name: Checkout branch | ||
uses: actions/[email protected] | ||
- name: Set up micromamba | ||
uses: mamba-org/setup-micromamba@d05808540d968a55ca33c798e0661fb98f533c73 | ||
- name: Add micromamba to GITHUB_PATH | ||
run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" | ||
- name: Install Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Run pre-commit checks | ||
uses: pre-commit/[email protected] | ||
|
||
unit-tests: | ||
name: Tests - ${{ matrix.os }} - Py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CI: True | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
CONDA_BUILD_YML: | ||
- linux_64_numpy1.20python3.8.____cpython | ||
include: | ||
- { os: ubuntu-latest, python-version: '3.8' } | ||
- { os: ubuntu-latest, python-version: '3.9' } | ||
- { os: ubuntu-latest, python-version: '3.10' } | ||
- { os: ubuntu-latest, python-version: '3.11' } | ||
- { os: macos-latest, python-version: '3.10' } | ||
- { os: windows-latest, python-version: '3.10' } | ||
steps: | ||
- name: Pull image | ||
run: docker pull condaforge/mambaforge:latest | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
- name: Set up conda env | ||
uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Fetch full git history | ||
run: git fetch --prune --unshallow | ||
- name: Run CI inside of container | ||
uses: ./.github/actions/conda-build | ||
with: | ||
conda_build_yml: ${{ matrix.CONDA_BUILD_YML }} | ||
environment-file: environment.yml | ||
init-shell: ${{ matrix.os == 'windows-latest' && 'powershell' || 'bash' }} | ||
cache-environment: true | ||
create-args: >- | ||
python=${{ matrix.python-version }} | ||
- name: Install repository (unix) | ||
if: matrix.os != 'windows-latest' | ||
shell: bash -el {0} | ||
run: pip install --no-use-pep517 --no-deps --disable-pip-version-check -e . | ||
- name: Install repository (windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: powershell | ||
run: pip install --no-use-pep517 --no-deps --disable-pip-version-check -e . | ||
- name: Run pytest (unix) | ||
if: matrix.os != 'windows-latest' | ||
shell: bash -el {0} | ||
run: pytest -nauto tests/glm --doctest-modules src/glum | ||
- name: Run pytest (windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: powershell | ||
run: pytest -nauto .\tests\glm --doctest-modules .\src\glum | ||
- name: Run doctest | ||
if: matrix.os != 'windows-latest' | ||
shell: bash -el {0} | ||
# Check that the readme example will work by running via doctest. | ||
# We run outside the repo to make the test a bit more similar to | ||
# a user running after installing with conda. | ||
run: | | ||
mkdir ../temp | ||
cp README.md ../temp | ||
cd ../temp | ||
python -m doctest -v README.md |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.