Skip to content

Now compute cuts_basic only by default #360

Now compute cuts_basic only by default

Now compute cuts_basic only by default #360

Workflow file for this run

# Test reprox on each PR.
name: Test package
# Trigger this code when a new release is published
on:
workflow_dispatch:
release:
types: [ created ]
pull_request:
push:
branches:
- master
jobs:
update:
name: "${{ matrix.test }}_py${{ matrix.python-version }}_sx_${{ matrix.straxen_version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
python-version: [3.8, 3.9, "3.10"]
test: [ 'coveralls']
straxen_version: ["v1.0.0", "v1.1.0", "v1.1.1", "v1.1.2", "v1.1.3", "v1.2.0", "v1.2.1", "v1.2.2", "v1.2.3", "v1.2.4", "v1.2.5", "v1.2.6", "v1.2.7", "v1.2.8", "v1.3.0", "v1.4.0", "v1.5.0", "v1.6.0", "latest"]
# Only run coverage on py3.8
exclude:
- python-version: "3.10"
test: coveralls
- python-version: 3.9
test: coveralls
env:
REPROX_CONFIG: /home/runner/work/reprox/reprox/test_folder/test.ini
steps:
# Setup and installation
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repo
uses: actions/checkout@v3
- name: Install requirements
run: |
pip install -r extra_requirements/requirements-tests.txt
python setup.py develop
- name: setup test config
run: |
bash .github/scripts/overwrite_testing_file.sh test_folder test.ini
# Secrets and required files
- name: patch utilix file
# Patch this file if we want to have access to the database
run: bash .github/scripts/create_readonly_utilix_config.sh
env:
# RunDB
RUNDB_API_URL: ${{ secrets.RUNDB_API_URL }}
RUNDB_API_USER_READONLY: ${{ secrets.RUNDB_API_USER_READONLY }}
RUNDB_API_PASSWORD_READONLY: ${{ secrets.RUNDB_API_PASSWORD_READONLY}}
PYMONGO_URL: ${{ secrets.PYMONGO_URL }}
PYMONGO_USER: ${{ secrets.PYMONGO_USER }}
PYMONGO_PASSWORD: ${{ secrets.PYMONGO_PASSWORD }}
PYMONGO_DATABASE: ${{ secrets.PYMONGO_DATABASE }}
# Run tests
- name: Test package
# This is running a normal test
if: matrix.test == 'pytest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run --source=reprox,bin -m pytest -v --log-level=DEBUG --durations 0
coveralls --service=github
- name: Coveralls
# Make the coverage report and upload
env:
NUMBA_DISABLE_JIT: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: matrix.test == 'coveralls'
run: |
coverage run --source=reprox,bin setup.py test -v
coveralls --service=github
echo ${{ matrix.straxen_version }}
bash .github/scripts/test_old_version.sh ${{ matrix.straxen_version }}
# Done
- name: goodbye
run: echo "tests done, bye bye"