Skip to content

Commit 9b1f308

Browse files
committed
add test action
1 parent 616bb70 commit 9b1f308

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Plugin Tests
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
plugin-tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Run tests
13+
# Auto-discovers and runs all test-*.sh scripts under any tests/ directory.
14+
# To add a new test, just drop a test-*.sh file in a tests/ folder.
15+
run: |
16+
shopt -s globstar nullglob
17+
failed=0
18+
for f in **/tests/test-*.sh; do
19+
echo "--- $f ---"
20+
bash "$f" || failed=1
21+
done
22+
exit $failed

0 commit comments

Comments
 (0)