Enhance and refactor URIs resolving logic #144
Workflow file for this run
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: CI Workflow | |
on: | |
push: | |
pull_request: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Execute a "nightly" build at 2 AM UTC | |
- cron: '0 2 * * *' | |
jobs: | |
build-with-conda-dependencies: | |
name: '[conda:${{ matrix.os }}]' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Release] | |
os: [ubuntu-22.04, macos-latest, windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Print used environment (no conda) [Conda] | |
shell: bash | |
run: | | |
env | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ci_env.yml | |
- name: Install the package | |
shell: bash -l {0} | |
run: python -m pip install --no-deps . | |
- name: Import the package | |
shell: bash -l {0} | |
run: python -c "import resolve_robotics_uri_py" | |
- name: Run the Python tests | |
shell: bash -l {0} | |
run: pytest --capture=no | |
# This test requires the conda-forge::icub-models, | |
# robotology::ergocub-software and | |
# robostack-staging::ros-humble-moveit-resources-panda-description | |
# conda packages, that are installed in ci_env.yml environment | |
- name: Check command line helper | |
shell: bash -l {0} | |
run: | | |
resolve-robotics-uri-py package://iCub/robots/iCubGazeboV2_7/model.urdf | |
resolve-robotics-uri-py package://ergoCub/robots/ergoCubSN000/model.urdf | |
resolve-robotics-uri-py package://moveit_resources_panda_description/urdf/panda.urdf | |
! resolve-robotics-uri-py package://this/file/does/not/exist | |
# Check that schema-less absolue paths are found (we use `which echo`) to get an arbitrary executable absolute path | |
resolve-robotics-uri-py `which echo` | |
! resolve-robotics-uri-py /this/is/not/an/existing/absolute/path | |