network/.github/workflows/shellcheck.yml
Rich Megginson 9ee0e98b77 Create separate github actions for various checks; get rid of monolithic tox.yml
There are now separate github actions for the various tests, instead of all of
them being done as part of the tox tests in tox.yml - ansible-lint,
ansible-test, etc.

Use the officially supported github actions e.g. for ansible-lint, ansible-test,
rather than using our own from `tox-lsr` and trying to keep up with the latest
changes.  Developers will still be able to use `tox-lsr` on their local
development environments to run these tests in the same way that they are run in
github actions, so that errors found when submitting PRs can be reproduced and
corrected locally without too many github UI roundtrips.

Using separate github actions, and especially the official github actions which
generally have support for in-line comments, should help greatly with
readability and troubleshooting test results.

Python tests are removed from roles that do not use python.

Python tests are now done by python-unit-tests.yml which also does the black,
flake8, and pylint tests.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-01-31 08:59:53 -07:00

29 lines
730 B
YAML

---
name: ShellCheck
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- main
workflow_dispatch:
env:
# some scripts source tox-lsr scripts - suppress that check
SHELLCHECK_OPTS: -e SC1091
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Update git
run: |
set -euxo pipefail
sudo apt-get update
sudo apt-get install -y git
- name: Checkout repo
uses: actions/checkout@v3
- name: Run ShellCheck
id: shellcheck_id
uses: ludeeus/action-shellcheck@master
- name: Show file paths scanned
run: |
echo Files scanned:
echo "${{ steps.shellcheck_id.outputs.files }}"