From 54e7e3eca05745b5c372b0d3c60b86ed72541756 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 31 Oct 2023 10:29:26 +0100 Subject: [PATCH] ci: add test with pip --- .github/workflows/pip-test.yml | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pip-test.yml diff --git a/.github/workflows/pip-test.yml b/.github/workflows/pip-test.yml new file mode 100644 index 00000000..b3280e4f --- /dev/null +++ b/.github/workflows/pip-test.yml @@ -0,0 +1,48 @@ +name: Tests with pip + +on: [ push, pull_request ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Install EGL mesa - required for Panda3D renderer + run: sudo apt-get update && sudo apt-get install -qqy libegl1-mesa libegl1-mesa-dev rclone + + - name: Caching of the happypose installation and data + uses: actions/cache@v3 + with: + path: local_data + key: data + + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: update pip + run: pip install -U pip + + - name: Install happypose + run: pip install ".[render,cpu,evaluation]" + + - name: Download pre-trained models required for tests + run: | + mkdir -p local_data + python -m happypose.toolbox.utils.download \ + --megapose_models \ + --examples \ + crackers_example \ + --cosypose_models \ + detector-bop-ycbv-pbr--970850 \ + coarse-bop-ycbv-pbr--724183 \ + refiner-bop-ycbv-pbr--604090 + + - name: Run tests + run: python -m unittest