Skip to content

Commit 5d4a1bc

Browse files
authored
Fix the bootstrap test in GitHub Actions (#474)
Installing the test dependencies like this also enables importing from the package itself, which is contrary to the bootstrapping scenario we're trying to test. Simplest solution is to specifically uninstall it again, which should leave all of the dependencies in place. Additionally, the test results during the bootstrap build were not causing the action to fail, and were therefore being ignored. Furthermore, it appears that the COLCON_ALL_SHELLS variable is not sufficient to generate usable bash hooks on Windows, so I'm disabling the bash test until we can come up with a good way to support it. Lastly, while in the package root, it's possible to perform imports from colcon_core as if it were already installed. The bootstrap scenario doesn't necessitate running from the repository root, so the test shouldn't do so either.
1 parent 76b0a24 commit 5d4a1bc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@ jobs:
4545
run: |
4646
python -m pip install -U pip setuptools
4747
python -m pip install -U -e .[test]
48+
python -m pip uninstall -y colcon-core
4849
- name: Build and test
49-
env:
50-
COLCON_ALL_SHELLS: 'TRUE'
5150
run: |
52-
python bin/colcon build --build-base ../build --install-base ../install
53-
python bin/colcon test --build-base ../build --install-base ../install
51+
cd ..
52+
python ${{github.workspace}}/bin/colcon build --paths ${{github.workspace}}
53+
python ${{github.workspace}}/bin/colcon test --paths ${{github.workspace}} --return-code-on-test-failure
5454
- name: Use the installed package (Bash)
55+
if: ${{runner.os != 'windows'}}
5556
shell: bash
5657
run: |
5758
. ../install/local_setup.sh

0 commit comments

Comments
 (0)