feat: add ability to do vector-vector loop #390
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: Tests | |
# Test on all pushes, except when the push is literally just a tag (because we | |
# tag automatically via CI, and therefore there's no extra code in that push). | |
# Also, only test on pull requests into master/dev. | |
on: | |
push: | |
tags-ignore: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
cpu_tests: | |
env: | |
ENV_NAME: tests | |
PYTHON: ${{ matrix.python-version }} | |
OS: ${{ matrix.os }} | |
LOG_LEVEL: ${{ (matrix.os == 'macos-latest' && 'WARNING') || 'INFO' }} # Suppress logging on macOS | |
name: Testing | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 1 | |
- uses: mpi4py/setup-mpi@v1 | |
- uses: FedericoCarboni/setup-ffmpeg@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
pip install .[test] | |
- name: Run Tests | |
run: | | |
python -m pytest --ignore tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=${{ env.LOG_LEVEL}} | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3.1.3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
gpu_tests: | |
env: | |
ENV_NAME: tests | |
PYTHON: "3.12" | |
OS: Ubuntu | |
name: Self-Hosted Tests (GPU) | |
runs-on: [self-hosted, gpu] | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Add Home to PATH | |
run: | | |
echo "/home/locoadmin/bin" >> $GITHUB_PATH | |
echo "/usr/local/cuda/bin" >> $GITHUB_PATH | |
- uses: actions/setup-node@v3.8.2 | |
with: | |
node-version: 16 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install | |
run: | | |
echo $(whoami) | |
source ~/.bashrc | |
micromamba activate testenv | |
echo $(which pip) | |
python -m pip install --upgrade pip | |
python -m pip install .[test,gpu] | |
- name: Run Tests | |
run: | | |
python -m pytest -k "gpu" --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3.1.3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true |