Skip to content

take logger in use

take logger in use #48

Workflow file for this run

name: Unit tests
on:
push:
branches:
- master
tags:
- v*
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ${{ matrix.os }}
fail-fast: false

Check failure on line 16 in .github/workflows/build-test.yml

View workflow run for this annotation

GitHub Actions / Unit tests

Invalid workflow file

The workflow is not valid. .github/workflows/build-test.yml (Line: 16, Col: 5): Unexpected value 'fail-fast'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install deps
run: |
pip install -e .
pip install -e .[dev]
- name: run tests
run: |
mkdir junit || true
nosetests --with-xunit --with-coverage --cover-package=pytest_opentmi --cover-html --cover-html-dir=htmlcov --cover-xml-file=coverage.xml --xunit-file=junit/results.xml
# missing tests, sorry
#- name: coveralls
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: coveralls
- name: pylint
run: |
pylint pytest_opentmi
- name: run example
working-directory: example
run: |
pytest --opentmi localhost:3000 --opentmi_token 123 --metadata foo bar --metadata DUT_SERIAL_NUMBER 123 --metadata DUT_MODEL S5 --metadata DUT_VENDOR samsang example.py
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
htmlcov
junit
- name: install rel deps
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
run: |
pip install wheel twine
python setup.py sdist
python setup.py bdist_wheel
- name: upload to pypi
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
env:
TWINE_USERNAME: "${{secrets.TWINE_USERNAME}}"
TWINE_PASSWORD: "${{secrets.TWINE_PASSWORD}}"
run: |
export PATH=$HOME/.local/bin:$PATH;
twine upload dist/*