Skip to content

Commit

Permalink
Tweak #454 (#460)
Browse files Browse the repository at this point in the history
* Update pytest.yml

* Update pytest.yml

* coverage to json

* other syntax

* first run, then report

* change all

* strings better?

* try using the default

* use github

* clean travis and decommission travis

* try renaming?

* name after test?

* test pyv

* retry

* go for the golden medal

* Update README.md
  • Loading branch information
JoranAngevaare committed Jun 4, 2021
1 parent b522a8c commit 75d605d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Test strax on each PR
name: pytest
name: tests

# Trigger this code when a new release is published
on:
Expand All @@ -16,21 +16,21 @@ on:

jobs:
update:
name: Pytest
name: "${{ matrix.test }}_py${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
coverage: [true, false]
test: ['coveralls', 'pytest']
# Only run coverage on py3.8
exclude:
- python-version: 3.6
coverage: true
test: coveralls
- python-version: 3.7
coverage: true
test: coveralls
- python-version: 3.9
coverage: true
test: coveralls
steps:
- name: Setup python
uses: actions/setup-python@v2
Expand All @@ -43,16 +43,15 @@ jobs:
pip install -r extra_requirements/requirements-tests.txt
# Perform coveralls (if coverage is set to True) or pytest
- name: Test package
if: matrix.coverage == false
run: python setup.py test -v
if: matrix.test == 'pytest'
run: pytest -v --durations 0
- name: Coveralls
if: matrix.coverage == true
if: matrix.test == 'coveralls'
env:
NUMBA_DISABLE_JIT: 1
run: coverage run --source=straxen setup.py test -v
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run --source=strax setup.py test -v
coveralls --service=github
- name: goodbye
run: echo goodbye
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,3 @@ install:

script:
- coverage run --source=strax setup.py test

# Upload code coverage information
# Only do this if not jitting, otherwise we miss those tests.
after_success:
- if [ $NUMBA_DISABLE_JIT ]; then coveralls; fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Streaming analysis for xenon experiments

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1340632.svg)](https://doi.org/10.5281/zenodo.1340632)
[![Build Status](https://travis-ci.org/AxFoundation/strax.svg?branch=master)](https://travis-ci.org/AxFoundation/strax)
[![tests](https://github.com/AxFoundation/strax/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/AxFoundation/strax/actions/workflows/pytest.yml)
[![Readthedocs Badge](https://readthedocs.org/projects/strax/badge/?version=latest)](https://strax.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/AxFoundation/strax/badge.svg?branch=master)](https://coveralls.io/github/AxFoundation/strax?branch=master)
[![PyPI version shields.io](https://img.shields.io/pypi/v/strax.svg)](https://pypi.python.org/pypi/strax/)
Expand Down

0 comments on commit 75d605d

Please sign in to comment.