Skip to content

Install Python dev version. #3

Install Python dev version.

Install Python dev version. #3

name: Python Unit Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ubuntu-latest
container:
image: ubuntu:latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:

Check failure on line 24 in .github/workflows/python_unit_test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/python_unit_test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 24
python-version: "${{matrix.python-version}}"-dev
- name: Configure apt to disable recommendations installation
run: |
echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf
- name: Install third-party libraries and tools
run: |
apt-get update
apt-get install -y cmake build-essential libboost-test-dev libfmt-dev wget unzip
apt-get install -y python3-pip python3-numpy
- name: Install Python dependencies
run: |
pip install 'torch>=2.2.0+cpu' --index-url https://download.pytorch.org/whl/cpu
pip install pytest
- name: Build and install
run: |
python setup.py build
find ${{github.workspace}} -name "_C.*.so" ${{github.workspace}}/torch_geopooling/ \;
- name: Run unit-tests
run: pytest -vv