Skip to content

[pre-commit.ci] pre-commit autoupdate #460

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #460

Workflow file for this run

name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-skip-ci-trigger:
name: "Detect CI Trigger: [skip-ci]"
runs-on: ubuntu-latest
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: "[skip-ci]"
unit-tests:
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
needs: detect-skip-ci-trigger
if: needs.detect-skip-ci-trigger.outputs.triggered == 'false'
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: checkout the repository
uses: actions/checkout@v3
with:
# need to fetch all tags to get a correct version
fetch-depth: 0 # fetch all branches and tags
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install dependencies
run: |
python -m pip install -r ci/requirements/normal.txt
- name: install blackdoc
run: python -m pip install .
- name: show versions
run: python -m pip list
- name: run tests
run: python -m pytest
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: checkout the repository
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install dependencies
run: python -m pip install -r ci/requirements/doc.txt
- name: show versions
run: python -m pip list
- name: run sphinx
run: |
cd doc
python -m sphinx -M html -d _build/doctrees -Ea -WT --keep-going -n . _build/html