Skip to content

feat(dri-1032): add the ability to support measure (unit group) #39

feat(dri-1032): add the ability to support measure (unit group)

feat(dri-1032): add the ability to support measure (unit group) #39

Workflow file for this run

name: CI
on: push
jobs:
test-and-lint:
name: Run Lint and Pytest
if: github.ref != 'refs/heads/develop' || contains(github.ref, 'release/') || contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-pip-
- name: Install dependencies
run: make install
- name: Lint
run: make lint
- name: Run unit tests
run: make test
- name: Coverage report
run: make coverage
deploy:
name: Build and publish to PyPI
needs: [ test-and-lint ]
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/corva-unit-converter
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install -U setuptools wheel
- name: Build the package
run: python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1