Implementing new API for NDK #525
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "*" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
docker-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build the neurotechdevkit docker image | |
run: | | |
docker build . --tag neurotechdevkit | |
- name: Test the docker image | |
run: | | |
docker run -w /ndk neurotechdevkit make test | |
test: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Set up python | |
id: setup-python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/[email protected] | |
with: | |
version: 1.4.0 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached poetry dependencies | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
venv-${{ runner.os }} | |
- name: Install package dependencies | |
run: poetry install --no-interaction --no-root | |
- name: Install stride | |
run: poetry run pip install git+https://github.com/trustimaging/stride | |
- name: Install neurotechdevkit | |
run: poetry install --only-root | |
- name: Run tests | |
run: | | |
make test-coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | |
- name: Install gcc-11 | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install gcc@11 | |
- name: Run integration test | |
env: | |
DEVITO_ARCH: gcc-11 | |
run: | | |
make test-integration |