x_out optional even for multi-task and bug fix with entropy related p… #410
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
# TODO: add in coverage (via codecov) | |
# TODO: pytest fixes (test file uses interactive stdins during test run) | |
# TODO: pypi deployment with successful tests on tag pushes | |
name: fvGP CI | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.10', '3.11', '3.12' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m ensurepip --upgrade | |
python -m pip install --upgrade setuptools | |
pip install -e .[tests] | |
- name: Run tests | |
run: pytest tests --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage/reports/ | |
env_vars: OS, PYTHON | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
name: codecov-umbrella | |
verbose: true | |
deploy: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Setup deploy | |
run: | | |
python -m ensurepip --upgrade | |
python -m pip install --upgrade setuptools | |
pip install --upgrade wheel twine hatch | |
hatch build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
- name: Github Release | |
uses: fnkr/github-action-ghr@v1 | |
env: | |
GHR_COMPRESS: xz | |
GHR_PATH: dist/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |