Skip to content

Restructure library into record and batch #10

Restructure library into record and batch

Restructure library into record and batch #10

Workflow file for this run

name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package and dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev,examples]'
- name: Lint
run: pre-commit run --all-files
- name: Test
run: pytest
- name: Examples
run: python examples/check_timesteps.py tests/data
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install pypa/build
run: python -m pip install build --user
- name: Build binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to test PyPI
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startswith(github.ref, 'refs/tags'))
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}