Skip to content

Remove extra pre-commit lines #12

Remove extra pre-commit lines

Remove extra pre-commit lines #12

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
schedule:
- cron: "0 0 * * *" # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually
jobs:
build:
name: Build (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
if [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/environment-windows.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV
fi
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/requirements/**.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: sandbox-devel
auto-update-conda: false
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true
- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE
- name: Set up conda environment
shell: bash -l {0}
run: |
python -m pip install -e .
conda list
- name: Run Tests
shell: bash -l {0}
run: |
pytest --cov=./ --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false
docs-build:
name: Documentation build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Install documentation dependencies
run: |
python -m pip install -r docs/requirements-docs.txt
- name: Build docs
run: |
cd docs
make html