Skip to content

Commit

Permalink
Add test yaml files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Willem committed Dec 13, 2023
1 parent e591253 commit 8932865
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-testing-linux.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 single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Linux

on:
push:
paths-ignore:
- '**.md'
- '**.rst'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8","3.9","3.10","3.11"]
steps:
- uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
pip install .
- name: Test with pytest
run: |
pytest -v tests/ --html=test-results.html --self-contained-html --cov=viper --no-cov-on-fail --cov-report=html --doctest-modules
- name: Upload pytest test results and coverage reports
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: |
./test-results.html
./htmlcov
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
43 changes: 43 additions & 0 deletions .github/workflows/python-testing-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: MacOS

on:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.rst'

jobs:
build:
name: macos (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["macos-latest"]
python-version: ["3.8", "3.9", "3.10","3.11"]
steps:
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: false
activate-environment: xradiotest
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge

- run: conda install python-casacore

- uses: actions/checkout@v3

- name: Install dependencies with pip
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Test with pytest
run: pytest

0 comments on commit 8932865

Please sign in to comment.