Migrating web to vue #780
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@2520c59 | |
- 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 dependencies for macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install libomp llvm | |
- name: Set environment variables for macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
echo "PATH=$(brew --prefix llvm)/bin:$PATH" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$(brew --prefix llvm)/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$(brew --prefix llvm)/include" >> $GITHUB_ENV | |
echo "CPATH=$(brew --prefix libomp)/include" >> $GITHUB_ENV | |
echo "DEVITO_ARCH=clang" >> $GITHUB_ENV | |
- name: Run integration test on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
make test-integration | |
- name: Run integration test | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
DEVITO_ARCH: gcc | |
run: | | |
make test-integration |