Merge pull request #54 from scipp/define-chopper-widths-centers #185
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
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp) | |
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: | |
name: Formatting and static analysis | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- 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: | |
name: Tests | |
needs: formatting | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: python -m pip install --upgrade pip | |
- run: python -m pip install -r requirements/ci.txt | |
- run: tox | |
docs: | |
needs: tests | |
name: Documentation | |
runs-on: 'ubuntu-latest' | |
steps: | |
- run: sudo apt install --yes pandoc | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: python -m pip install --upgrade pip | |
- run: python -m pip install -r requirements/ci.txt | |
- run: tox -e docs | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: html | |
path: html/ |