diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd639ec..02185e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,7 @@ +--- name: Run tests -on: +on: # yamllint disable-line rule:truthy push: branches: ['main'] pull_request: @@ -16,3 +17,8 @@ jobs: repository: colcon/colcon-notification # Use HEAD to find strategy.json file instead of the tip of colcon/ci setup-repository: '' + yamllint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: yamllint . diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index e41176e..2f5e604 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,6 +1,7 @@ +--- name: Run tests -on: +on: # yamllint disable-line rule:truthy workflow_call: inputs: codecov: @@ -9,7 +10,8 @@ on: required: false type: boolean matrix-filter: - description: 'jq filter string indicating which configuration(s) should be included' + description: 'jq filter string indicating which configuration(s) + should be included' default: '.' required: false type: string diff --git a/action.yaml b/action.yaml index 2eb4ced..b4b2263 100644 --- a/action.yaml +++ b/action.yaml @@ -30,19 +30,32 @@ runs: echo ::endgroup:: echo ::group::Run tests - python -m pytest --cov --cov-branch --cov-report xml:coverage.xml --cov-config setup.cfg + python -m pytest \ + --cov --cov-branch \ + --cov-report xml:coverage.xml \ + --cov-config setup.cfg echo ::endgroup:: echo ::group::Test publish # Run publish-python without uploading the results if [ -f publish-python.yaml ]; then PUBLISH_PYTHON=$(mktemp -d) - git clone https://github.com/dirk-thomas/publish-python.git $PUBLISH_PYTHON + pushd $PUBLISH_PYTHON + git clone https://github.com/dirk-thomas/publish-python.git . + popd python -m pip install -U PyYAML wheel python $PUBLISH_PYTHON/bin/publish-python wheel:pypi if [ ! -z "${{matrix.stdeb-check}}" ]; then - sudo apt install -y debhelper dh-python fakeroot python3-all python3-stdeb python3-yaml - DEB_BUILD_OPTIONS=nocheck /usr/bin/python3 $PUBLISH_PYTHON/bin/publish-python stdeb:packagecloud + sudo apt install \ + debhelper \ + dh-python \ + fakeroot \ + python3-all \ + python3-stdeb \ + python3-yaml \ + -y + DEB_BUILD_OPTIONS=nocheck /usr/bin/python3 \ + $PUBLISH_PYTHON/bin/publish-python stdeb:packagecloud else echo "Skipping stdeb test on non-Debian platform..." fi