Skip to content

update tests workflow to define Python versions as strings #185

update tests workflow to define Python versions as strings

update tests workflow to define Python versions as strings #185

Workflow file for this run

name: tests_docker
on:
push:
branches:
- '**' # Matches all branches
pull_request:
branches:
- '**' # Matches all branches
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"] # Define Python versions as strings
open3d-version: [0.18]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install system dependencies
run: |
sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install -y --no-install-recommends \
gdb \
git \
make \
libeigen3-dev \
libgl1-mesa-dev \
libglew-dev \
libglfw3-dev \
libglu1-mesa-dev \
libpng-dev \
libusb-1.0-0 \
libgomp1 \
pybind11-dev \
pandoc \
software-properties-common \
mesa-utils && \
sudo rm -rf /var/lib/apt/lists/*
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install open3d==${{ matrix.open3d-version }}
pip install -e .[dev,LAS]
- name: Run tests
run: make test
- name: Generate coverage badge
run: coverage-badge -f -o images/coverage.svg
- name: Verify changed files
uses: tj-actions/verify-changed-files@v6
id: changed_files
with:
files: images/coverage.svg
- name: Commit badge
if: steps.changed_files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add images/coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.changed_files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}