v0.1.3 #1558
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
# This workflow will install Python dependencies, run tests and lint | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: ci | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: install | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.CUDA_OPS_REPO_KEY }}' | |
python3 -m pip install --upgrade pip | |
bash ./scripts/install_cpu_dep_full.sh | |
python3 -m pip freeze | |
- name: isort | |
run: | | |
python3 -m isort -c vis4d | |
python3 -m isort -c tests | |
- name: black | |
run: | | |
python3 -m black --check vis4d | |
python3 -m black --check tests | |
- name: lint | |
run: | | |
python3 -m pylint vis4d | |
python3 -m pylint tests | |
- name: docstyle | |
run: | | |
python3 -m pydocstyle --convention=google vis4d | |
python3 -m pydocstyle --convention=google tests | |
- name: mypy | |
run: | | |
python3 -m mypy vis4d | |
python3 -m mypy tests | |
test: | |
name: test py${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules using a PAT | |
run: | | |
git config --file .gitmodules --get-regexp url | while read url; do | |
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ secrets.KEY_TEST_DATA_REPO }}:${{ secrets.KEY_TEST_DATA_REPO }}@github.com\//") | |
done | |
git submodule sync | |
git submodule update --init --recursive | |
- name: set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install dependencies | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.CUDA_OPS_REPO_KEY }}' | |
python3 -m pip install --upgrade pip | |
bash ./scripts/install_cpu_dep_full.sh | |
python3 -m pip install -e . | |
python3 -m pip freeze | |
- name: test | |
run: python3 -m coverage run --source=vis4d -m pytest --pyargs tests | |
- name: test coverage | |
run: python3 -m coverage report --fail-under=88 -m | |
- name: build | |
run: python3 -m build |