Skip to content

Promoting develop to master version 0.0.3 #2

Promoting develop to master version 0.0.3

Promoting develop to master version 0.0.3 #2

Workflow file for this run

# This workflows will will for a variety of Python versions
# - install the code base
# - lint the code base
# - test the code base
# - upload the test coverage to codecov
#
# - it will also build the package
# - check the package
#
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: CI using pip
on: [push, pull_request]
jobs:
CI_Testing:
strategy:
max-parallel: 4
matrix:
python-version: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e '.[dev]'
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./EasyReflectometry --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./EasyReflectometry --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with tox
run: |
pip install tox tox-gh-actions coverage
tox
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
name: Pytest coverage
env_vars: OS,PYTHON,GITHUB_ACTIONS,GITHUB_ACTION,GITHUB_REF,GITHUB_REPOSITORY,GITHUB_HEAD_REF,GITHUB_RUN_ID,GITHUB_SHA,COVERAGE_FILE
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
test_Packaging:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: install pypa/build
run: python -m pip install build --user
- name: build a binary wheel and source tarball
run: python -m build
- name: Check Build
run: |
cd ./dist
pytest ../