PKG: always use python -m pip install ...
#248
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-Test | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
- uses: pre-commit/[email protected] | |
test: | |
name: Tests | |
runs-on: ${{ matrix.host-os }} | |
needs: lint | |
strategy: | |
matrix: | |
host-os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Set env.REPOSITORY_NAME # just the repo, as opposed to org/repo | |
run: | | |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/} | |
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV | |
python_version="${{ matrix.python-version }}" | |
export PYTHON_VERSION_NODOT="${python_version//\./}" | |
echo "PYTHON_VERSION_NODOT=${PYTHON_VERSION_NODOT}" >> $GITHUB_ENV | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Install micromamba with build dependencies | |
uses: mamba-org/setup-micromamba@v1 | |
if: matrix.host-os == 'macos-latest' | |
with: | |
init-shell: bash | |
environment-name: build-env | |
create-args: >- | |
python=${{ matrix.python-version }} | |
arpack=*=mpi_openmpi* | |
gfortran | |
openmpi | |
- name: Install tree program | |
if: matrix.host-os == 'macos-latest' | |
run: | | |
brew install tree | |
- name: Set up Python ${{ matrix.python-version }} | |
if: matrix.host-os != 'macos-latest' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
set -vxeuo pipefail | |
bash ./scripts/install-deps.sh | |
ls -Al . | |
ls -Al ./dist/ | |
tree . | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.REPOSITORY_NAME }}-wheels | |
path: dist/*.whl | |
- name: Test with pytest | |
run: | | |
set -vxeuo pipefail | |
bash ./scripts/run-tests.sh | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
needs: test | |
strategy: | |
matrix: | |
python-version: [3.8] | |
fail-fast: false | |
steps: | |
- name: Set env.REPOSITORY_NAME # just the repo, as opposed to org/repo | |
run: | | |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/} | |
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
set -vxeuo pipefail | |
bash ./scripts/install-deps.sh | |
- name: Build Docs | |
run: | | |
set -vxeuo pipefail | |
bash ./scripts/build-docs.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.REPOSITORY_NAME }}-docs | |
path: docs/build/html/ |