Skip to content

Commit 2738c32

Browse files
jagerber48wshanks
authored andcommitted
Add GitHub Action to run tests (#194)
Test matrix runs on Windows/Mac/Linux, Python 3.8-3.12
1 parent 1eaf8da commit 2738c32

File tree

5 files changed

+48
-106
lines changed

5 files changed

+48
-106
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
20+
runs-on: ${{ matrix.os }}
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install -e .
32+
python -m pip install pytest pytest-cov numpy
33+
- name: Test source code and docs
34+
run: |
35+
pytest --cov . --cov-report xml
36+
# - name: Upload coverage reports to Codecov
37+
# uses: codecov/codecov-action@v3
38+
# with:
39+
# token: ${{ secrets.CODECOV_TOKEN }}
40+
# flags: ${{ matrix.python-version }}
41+
# files: coverage.xml
42+
# fail_ci_if_error: true
43+
# verbose: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ uncertainties.egg-info/
1212
.cache
1313
# vim temporary files
1414
.*.swp
15+
16+
coverage.xml

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

README.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ uncertainties
1010
:target: https://pepy.tech/project/uncertainties
1111
.. image:: https://codecov.io/gh/lebigot/uncertainties/branch/master/graph/badge.svg
1212
:target: https://codecov.io/gh/lebigot/uncertainties/
13-
.. image:: https://travis-ci.com/lebigot/uncertainties.svg?branch=master
14-
:target: https://travis-ci.com/lebigot/uncertainties
15-
.. image:: https://ci.appveyor.com/api/projects/status/j5238244myqx0a0r?svg=true
16-
:target: https://ci.appveyor.com/project/lebigot/uncertainties
13+
.. image:: https://img.shields.io/github/actions/workflow/status/lmfit/uncertainties/python-package.yml?logo=github%20actions
14+
:target: https://github.com/lmfit/uncertainties/blob/main/.github/workflows/python-package.yml
1715

1816
**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).
19-
17+
2018
This is the ``uncertainties`` Python package, which performs **transparent
2119
calculations with uncertainties** (aka "error propagation"):
2220

appveyor.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)