CI Workflow #295
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 | |
- name: Check command line helper (Ubuntu and macOS) | |
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') | |
shell: bash -l {0} | |
run: | | |
mkdir -p /tmp/folder/ && touch "/tmp/folder/file with spaces.txt" | |
mkdir -p /tmp/folder/ && touch "/tmp/folder/file_without_spaces.txt" | |
resolve-robotics-uri-py "file:///tmp/folder/file_without_spaces.txt" | |
resolve-robotics-uri-py "file:///tmp/folder/file with spaces.txt" | |
resolve-robotics-uri-py "file:/tmp/folder/file_without_spaces.txt" | |
resolve-robotics-uri-py "file:/tmp/folder/file with spaces.txt" |