Skip to content

Commit

Permalink
.github: add PR test
Browse files Browse the repository at this point in the history
Add a PR testing workflow where we can start to add autotests.

At the moment, it just checks that the Makefile workflows function, but
it could be expanded to include unit tests and (if we get a NILRT
runner) integration tests.

Signed-off-by: Alex Stewart <[email protected]>
  • Loading branch information
amstewart committed Sep 13, 2024
1 parent 8118fbd commit ef252a4
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PR Testing

on: [pull_request]

jobs:
make-workflows:
runs-on: ubuntu-latest

env:
DESTDIR: /tmp/nilrt-snac

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history so that git-describe works
- run: make all
- name: make install
run: |
make install
tree -ap "${DESTDIR}"
- name: make uninstall
run: |
make uninstall
tree -ap "${DESTDIR}"
leftover_files=false
find "${DESTDIR}" -type f >./leftover_files
while read file; do
echo "ERROR: leftover file: ${file}"
leftover_files=true
done <./leftover_files
if $leftover_files; then
echo "ERROR: uninstall did not remove all files."
cat ./leftover_files
exit 1
else
echo "OK"
fi
- name: make dist
run: |
make dist
tar --list -f ./nilrt-snac-*.tar.gz

0 comments on commit ef252a4

Please sign in to comment.