Skip to content

Commit

Permalink
chore(ci): lint with yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Jan 15, 2024
1 parent 9ec453e commit c8b57e0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build rock
uses: canonical/craft-actions/rockcraft-pack@main
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/run-linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- name: Install dependencies
run: |
sudo snap install shellcheck
pip install -U yamllint
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -25,3 +26,7 @@ jobs:
- name: Run ShellCheck
run: |
./tools/external/snapd-testing-tools/utils/spread-shellcheck tests/spread/ spread.yaml
- name: Run yamllint
run: |
yamllint --strict .
11 changes: 11 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

extends: relaxed

ignore:
- 'tools/external/'

rules:
# Disable line length limit because the build scripts can
# get fairly long
line-length: disable
1 change: 0 additions & 1 deletion rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,3 @@ services:
SNAPCRAFT_BUILD_ENVIRONMENT: host
# put libexec on the path, for craftctl
PATH: /usr/libexec/snapcraft:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

8 changes: 4 additions & 4 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ environment:
SNAPCRAFT_BUILD_BASE: core22

include:
- tests/
- tools/
- tests/
- tools/

backends:
google:
Expand Down Expand Up @@ -69,11 +69,11 @@ prepare: |
snap install docker --channel=core18/stable
else
snap install docker
fi
fi
# make sure docker is working
retry -n 10 --wait 2 sh -c 'docker run --rm hello-world'
# install rockcraft just to use its bundled skopeo
snap install --classic --stable rockcraft
Expand Down

0 comments on commit c8b57e0

Please sign in to comment.