Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre gap input #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ All of the following inputs are optional.
- `GAP_TESTFILE`:
- The name of the GAP file to be read for executing the package tests.
- default: `'tst/testall.g'`
- `pre-gap`:
- Commands to be executed immediately before GAP is launched. For example,
specifying `'valgrind --trace-children=yes --leak-check=full'` will ensure
that GAP is launched using Valgrind, and the test-suite will be checked for
memory leaks.
- default: `''`

### Example

Expand All @@ -46,10 +52,12 @@ jobs:
```

## Contact

Please submit bug reports, suggestions for improvements and patches via
the [issue tracker](https://github.com/gap-actions/run-pkg-tests/issues).

## License

The action `run-pkg-tests` is free software; you can redistribute
and/or modify it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or (at your
Expand Down
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inputs:
required: false
type: boolean
default: false
pre-gap:
description: 'Commands to be executed immediately before GAP is launched (e.g. ''valgrind --trace-children=yes --leak-check=full'')'
required: false
type: string
default: ''
env:
CHERE_INVOKING: 1

Expand All @@ -37,8 +42,9 @@ runs:
mkdir -p /tmp/gaproot/pkg/
ln -f -s $PWD /tmp/gaproot/pkg/

# start GAP with custom GAP root, to ensure correct package version is loaded
GAP="$GAPROOT/gap -l /tmp/gaproot; --quitonbreak"
# start GAP with custom GAP root and any pre-gap commands, to ensure
# correct package version is loaded
GAP="${{ inputs.pre-gap }} $GAPROOT/gap -l /tmp/gaproot; --quitonbreak"

if ${{ inputs.only-needed }} = 'true' ; then
GAP="$GAP -A"
Expand Down