Skip to content

Merge pull request #39 from scikit-hep/dependabot/github_actions/acti… #112

Merge pull request #39 from scikit-hep/dependabot/github_actions/acti…

Merge pull request #39 from scikit-hep/dependabot/github_actions/acti… #112

Workflow file for this run

name: unittests
on:
workflow_dispatch:
push:
tags:
- "*"
branches:
- master
- main
- "ci/*"
pull_request:
jobs:
unittests:
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
strategy:
fail-fast: false
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- 3.10
name: Tests for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.python-version }}
activate-environment: formulate-env
- name: Install ROOT
run: |
mamba install root -y
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
mamba install coveralls -y
mamba install pytest-cov -y
pip install -e .[dev,test]
- name: Test with pytest
run: |
pytest --cov=formulate --verbose --run-slow
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install wheel and sdist requirements
run: python -m pip install "build"
- name: Build sdist and wheel
run: python3 -m build
- uses: actions/upload-artifact@v4
with:
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')