Skip to content

Commit

Permalink
Add GitHub Action to run tests
Browse files Browse the repository at this point in the history
Test matrix runs on Windows/Mac/Linux, Python 3.8-3.12
  • Loading branch information
jagerber48 authored and wshanks committed Mar 7, 2024
1 parent 1eaf8da commit 7950418
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 106 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pytest pytest-cov numpy
- name: Test source code and docs
run: |
pytest --cov . --cov-report xml
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# flags: ${{ matrix.python-version }}
# files: coverage.xml
# fail_ci_if_error: true
# verbose: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ uncertainties.egg-info/
.cache
# vim temporary files
.*.swp

coverage.xml
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ uncertainties
:target: https://pepy.tech/project/uncertainties
.. image:: https://codecov.io/gh/lebigot/uncertainties/branch/master/graph/badge.svg
:target: https://codecov.io/gh/lebigot/uncertainties/
.. image:: https://travis-ci.com/lebigot/uncertainties.svg?branch=master
:target: https://travis-ci.com/lebigot/uncertainties
.. image:: https://ci.appveyor.com/api/projects/status/j5238244myqx0a0r?svg=true
:target: https://ci.appveyor.com/project/lebigot/uncertainties
.. image:: https://img.shields.io/github/actions/workflow/status/lmfit/uncertainties/python-package.yml?logo=github%20actions
:target: https://github.com/lmfit/uncertainties/blob/main/.github/workflows/python-package.yml

**Call for maintainers**: if you want this project to keep living and are ready to maintain it (pull requests management, issue resolution…), please contact me! I am ready to share my knowledge of the code logic by participating in discussions (notably around pull requests and issues).

This is the ``uncertainties`` Python package, which performs **transparent
calculations with uncertainties** (aka "error propagation"):

Expand Down
59 changes: 0 additions & 59 deletions appveyor.yml

This file was deleted.

0 comments on commit 7950418

Please sign in to comment.