Skip to content

Commit

Permalink
Run yamllint in CI for this repository
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay committed Mar 2, 2024
1 parent 06bb7b5 commit 0cef836
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Run tests

on:
on: # yamllint disable-line rule:truthy
push:
branches: ['main']
pull_request:
Expand All @@ -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 .
6 changes: 4 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Run tests

on:
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
codecov:
Expand All @@ -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
Expand Down
21 changes: 17 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cef836

Please sign in to comment.