FEAT: Configurable working directory #35
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 | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master, "release/*", "dev"] | |
jobs: | |
run_tests_ubuntu: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11", "3.12"] | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install CUDA toolkit | |
run: | | |
sudo apt update | |
sudo apt install -y wget | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb | |
sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
sudo apt update | |
sudo apt -y install cuda-toolkit-12-3 | |
echo "PATH=$PATH:/usr/local/cuda/bin" >> $GITHUB_ENV | |
- name: Install OpenCV | |
run: | | |
sudo apt install -y libopencv-dev pkg-config | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r tests/requirements.txt | |
- name: List dependencies | |
run: | | |
python -m pip list | |
- name: Run pytest | |
run: | | |
pytest -v | |
# upload code coverage report | |
code-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
lfs: "true" | |
- run: git lfs pull | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install CUDA toolkit | |
run: | | |
sudo apt update | |
sudo apt install -y wget | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb | |
sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
sudo apt update | |
sudo apt -y install cuda-toolkit-12-3 | |
echo "PATH=$PATH:/usr/local/cuda/bin" >> $GITHUB_ENV | |
- name: Install OpenCV | |
run: | | |
sudo apt install -y libopencv-dev pkg-config | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r tests/requirements.txt | |
pip install pytest-cov[toml] | |
- name: Run tests and collect coverage | |
run: pytest --cov nvcc4jupyter | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |