Skip to content

Merge pull request #139 from valohai/output-properties-helper #331

Merge pull request #139 from valohai/output-properties-helper

Merge pull request #139 from valohai/output-properties-helper #331

Workflow file for this run

name: CI
'on':
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
cache: pip
cache-dependency-path: '**/setup.cfg'
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.in
python -m pip install -e .
- name: Test with pytest
run: pytest -ra --cov .
Typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install
run: python -m pip install -r requirements-typecheck.txt -e .
- run: mypy --strict .
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install
run: python -m pip install build
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- Build
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/valohai-utils/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true