Add notebook on how to build non ramses datasets #455
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
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright (c) 2024 Osyris contributors (https://github.com/osyris-project/osyris) | |
name: Build Osyris | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
which python | |
python -m pip install --upgrade pip | |
python -m pip install flake8==7.0.0 black[jupyter]==24.3.0 isort==5.13.2 | |
- name: Check black formatting | |
run: | | |
black --check . | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --statistics | |
- name: Check imports with isort | |
run: | | |
isort --check . | |
tests: | |
needs: formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest==7.4.2 | |
python -m pip install -r docs/requirements.txt | |
python -m pip install -e . | |
- name: Run python tests | |
run: | | |
python -m pytest test | |
docs: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
sudo apt install pandoc | |
python -m pip install --upgrade pip | |
python -m pip install -r docs/requirements.txt | |
python -m pip install -e . | |
- name: Build documentation | |
run: | | |
sphinx-build -j2 -b html docs/. docs/build | |
- name: Archive documentation artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DocumentationHTML | |
path: docs/build | |
deploy: | |
needs: docs | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build | |
- name: Build wheels | |
run: | | |
python -m build --sdist --wheel --outdir dist/ . | |
- name: Publish to PyPI | |
uses: pypa/[email protected] |