. #2260
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
name: CI | |
on: [push] | |
jobs: | |
pre-commit-checks: | |
name: Linux - pre-commit checks - Python 3.10 | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
PRE_COMMIT_USE_MICROMAMBA: 1 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3.5.2 | |
- 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/action@v3.0.0 | |
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: Checkout branch | |
uses: actions/checkout@v3 | |
- name: Set up conda env | |
uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1 | |
with: | |
environment-file: environment.yml | |
create-args: python=${{ matrix.PYTHON_VERSION }} | |
- name: Install repository | |
shell: bash -el {0} | |
run: pip install --no-use-pep517 --no-deps --disable-pip-version-check -e . | |
- name: Run pytest | |
shell: bash -el {0} | |
run: pytest -nauto tests --doctest-modules src/glum/ | |
- name: Run doctest | |
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 | |
linux-conda-build: # TODO: merge with other action | |
name: Linux - conda-build - Python ${{ matrix.CONDA_BUILD_YML }} | |
runs-on: ubuntu-latest | |
env: | |
CI: True | |
strategy: | |
fail-fast: true | |
matrix: | |
CONDA_BUILD_YML: | |
- linux_64_numpy1.20python3.8.____cpython | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
- name: Fetch full git history | |
run: git fetch --prune --unshallow | |
- uses: mamba-org/setup-micromamba@875557da4ee020f18df03b8910a42203fbf02da1 | |
with: | |
environment-name: build | |
create-args: boa | |
- name: Build conda package | |
shell: bash -el {0} | |
run: conda-mambabuild -m ".ci_support/${{ matrix.CONDA_BUILD_YML }}.yaml" conda.recipe |