Skip to content

Commit

Permalink
TST: Create unit-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ColmTalbot committed Feb 22, 2024
1 parent 712c766 commit 3d885bd
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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: [ "github-main" ]
pull_request:
branches: [ "github-main" ]

jobs:
build:

runs-on: ubuntu-latest
container: containers.ligo.org/lscsoft/bilby/v2-bilby-python3{{ matrix.python-minor }}
strategy:
fail-fast: false
matrix:
python-minor: ["10", "11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.${{ matrix.python-minor }}
uses: actions/setup-python@v3
with:
python-version: 3.${{ matrix.python-minor }}
- name: Install package
run: |
python -m pip install .
conda list --show-channel-urls
- name: Run precommits
run: |
pre-commit run --all-files --verbose --show-diff-on-failure
- name: Run unit tests
run: |
pytest --cov-bilby --durations 10
- name: Run sampler tests
run: |
pytest test/integration/sampler_run_test.py --durations 10 -v

0 comments on commit 3d885bd

Please sign in to comment.