Skip to content

Commit 90e866a

Browse files
authored
Merge pull request #15 from fmount/github_actions
Add basic github action to perform sanity-check against PRs
2 parents f288cd1 + 4073b14 commit 90e866a

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/sanity-check.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sanity Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
make_check:
7+
name: check for issues in the collection_scripts
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.9", "3.11"]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: sudo apt-get install -y make
20+
- name: Install tox and any other packages
21+
run: pip install tox
22+
- name: Run ShellCheck
23+
run: make check
24+
- name: Run PyTest
25+
run: make pytest

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99
build: check-image podman-build podman-push ## Build and push the must-gather image
1010

1111
check: ## Run sanity check against the script collection
12-
shellcheck collection-scripts/*
12+
shellcheck -e SC2016 -e SC2006 -e SC2140 -e SC2086 collection-scripts/*
1313

1414
pytest: ## Run sanity check against python scripts in pydir
1515
tox -c pyscripts/tox.ini

0 commit comments

Comments
 (0)