ci(gitea): workflow — shellcheck + functional tests + secret scan [#784]
ci / lint-and-test (push) Waiting to run
ci / lint-and-test (push) Waiting to run
Fleet CI standard adoption (Discourse t/333); 16 tests existed but nothing enforced them mechanically. https://projects.knownelement.com/issues/784
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# doorman CI [#784] — fleet standard per Discourse t/333.
|
||||
# Badge-door code: shellcheck zero-warning + functional tests + secret scan.
|
||||
name: ci
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
lint-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:20-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: shellcheck (zero-warning)
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -qq -y shellcheck >/dev/null
|
||||
git ls-files '*.sh' | grep -v '^legacy/' | xargs -r shellcheck
|
||||
- name: functional tests
|
||||
run: bash tests/run-tests.sh
|
||||
- name: secret scan
|
||||
run: |
|
||||
if grep -rInE "BEGIN (RSA |OPENSSH |EC |DSA )?PRIVATE KEY|aws_secret_access_key *=|AKIA[0-9A-Z]{16}" --exclude-dir=.git --exclude-dir=legacy .; then
|
||||
echo "::error::secret material committed"; exit 1
|
||||
else
|
||||
echo "secret scan clean"
|
||||
fi
|
||||
Reference in New Issue
Block a user