Skip to content

Commit

Permalink
tests: migrate to pytest best as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Feb 10, 2023
1 parent d2caaef commit 334cc59
Show file tree
Hide file tree
Showing 22 changed files with 868 additions and 1,611 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Checks

on:
push:
pull_request:
schedule:
- cron: "0 0 1 * *"

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install codecov coverage flake8 pytest
# install dependencies
pip install -e .
# show installed packages
pip freeze
- name: Test with pytest
run: |
coverage run --source=igor2 -m pytest tests
- name: Lint with flake8
run: |
flake8 .
- name: Submit code coverage
run: |
coverage report -m
codecov
33 changes: 33 additions & 0 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release to PyPI

on:
push:
tags:
- '*'

jobs:
deploy:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -e .
- name: Build and publish
env:
TWINE_USERNAME: ci_afm
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
run: |
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
0.5.0
- BREAKING CHANGE: remove the igorpy compatibility layer
- docs: include Readme.rst for description on PyPI
- tests: migrate to pytest best as possible
- ref: remove hard-coded logging statement from __init__
- ref: flake8
- ref: remove clutter LGPL notices, nobody does that anymore and
Expand Down
202 changes: 0 additions & 202 deletions test/test-igorpy.py

This file was deleted.

Loading

0 comments on commit 334cc59

Please sign in to comment.