Skip to content

Use py 3.10 and mantid 6.8 in CI #732

Use py 3.10 and mantid 6.8 in CI

Use py 3.10 and mantid 6.8 in CI #732

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true # cancel jobs from previous push
jobs:
formatting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.8'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e static
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply automatic formatting
tests:
needs: formatting
name: tests ${{ matrix.variant.os }}, py${{ matrix.python-version }}
runs-on: ${{ matrix.variant.os }}
defaults:
run:
shell: bash -l {0} # required for conda env
strategy:
fail-fast: false
matrix:
variant:
- {os: ubuntu-20.04, build-config: ci-linux}
- {os: macos-11, build-config: ci-macos}
- {os: windows-2019, build-config: ci-windows}
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup conda environment
uses: mamba-org/provision-with-micromamba@main
with:
micromamba-version: 1.0.0
environment-file: .buildconfig/${{ matrix.variant.build-config }}.yml
cache-env: true
extra-specs: |
python=${{ matrix.python-version }}
conda-build
- run: conda develop src
- run: python -m pytest
- run: |
python -m sphinx -j2 -v -b html -d doctrees docs html
python -m sphinx -j2 -v -b doctest -d doctrees docs html
find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete
if: ${{ contains(matrix.variant.os, 'ubuntu') && matrix.python-version == '3.10' }}
- run: python -m sphinx -j4 -v -b linkcheck -d doctrees docs html
# Linkcheck can be flaky. Avoid randomly breaking PR builds by running only on `main`
if: ${{ contains(matrix.variant.os, 'ubuntu') && matrix.python-version == '3.10' && github.ref == 'refs/heads/main' }}
- uses: actions/upload-artifact@v3
if: ${{ contains(matrix.variant.os, 'ubuntu') && matrix.python-version == '3.10' }}
with:
name: DocumentationHTML
path: html/