nwb-linkml/.github/workflows/tests.yml

69 lines
1.6 KiB
YAML
Raw Normal View History

2023-08-31 22:44:43 +00:00
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
2023-08-31 22:44:43 +00:00
jobs:
test:
2023-08-31 22:44:43 +00:00
strategy:
2024-07-02 07:12:23 +00:00
fail-fast: false
2023-08-31 22:44:43 +00:00
matrix:
2024-07-02 06:58:00 +00:00
python-version: ["3.10", "3.11", "3.12"]
2023-08-31 22:44:43 +00:00
runs-on: ubuntu-latest
steps:
2024-08-21 02:57:35 +00:00
- uses: actions/checkout@v4
2023-08-31 22:44:43 +00:00
2023-10-10 06:40:31 +00:00
- name: Install system libraries
run: |
sudo apt update
sudo apt install -y libhdf5-dev hdf5-tools
2023-08-31 22:44:43 +00:00
- name: Set up python
2024-08-21 02:57:35 +00:00
uses: actions/setup-python@v5
2023-08-31 22:44:43 +00:00
with:
python-version: ${{ matrix.python-version }}
2023-09-06 05:45:26 +00:00
cache: 'pip'
2024-08-21 06:17:44 +00:00
cache-dependency-path: |
nwb_linkml/pyproject.toml
nwb_schema_language/pyproject.toml
nwb_models/pyproject.toml
2023-08-31 22:44:43 +00:00
- name: Install dependencies
2024-09-11 22:56:45 +00:00
run: |
pip install -e .[tests]
pip install -e ../nwb_schema_language
pip install -e ../nwb_models
2023-09-06 02:25:20 +00:00
working-directory: nwb_linkml
2023-08-31 22:44:43 +00:00
2023-09-06 05:42:46 +00:00
- name: Run Tests
run: pytest
working-directory: nwb_linkml
- name: Run nwb_schema_language Tests
run: pytest
working-directory: nwb_schema_language
2024-08-06 08:46:20 +00:00
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2.3.0
if: runner.os != 'macOS'
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
debug: true
finish-coverage:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.3.0
with:
parallel-finished: true