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

This PR just merges v2 into cygwin-v2 to hopefully resolve Issue #27 #28

Closed
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
# the order of the checkout actions is important because all contents of
# the target folder of the checkout action is removed
- name: "Clone the Example package"
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: gap-packages/example
- name: "Check out this repository"
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: this-action/
- uses: gap-actions/setup-cygwin@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: gap-actions/setup-gap@v2
- uses: gap-actions/build-pkg@v1
- uses: gap-actions/run-pkg-tests@v2
Expand Down
20 changes: 18 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ inputs:
NO_COVERAGE:
description: 'set to a non-empty string to suppress gathering coverage'
required: false
type: string
default: ''
GAP_TESTFILE:
description: 'Name of the GAP file to be read for executing the package tests (overrides TestFile in PackageInfo.g)'
required: false
type: string
default: ''
only-needed:
description: 'If set to true then only needed dependencies of the package being tested are loaded'
required: false
type: boolean
default: false
env:
CHERE_INVOKING: 1

Expand All @@ -31,7 +38,11 @@ runs:
ln -f -s $PWD /tmp/gaproot/pkg/

# start GAP with custom GAP root, to ensure correct package version is loaded
GAP="$GAPROOT/bin/gap.sh -l /tmp/gaproot; --quitonbreak"
GAP="$GAPROOT/gap -l /tmp/gaproot; --quitonbreak"

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

# Unless explicitly turned off by setting the NO_COVERAGE environment variable,
# we collect coverage data
Expand All @@ -51,8 +62,13 @@ runs:
# Load the package with debug info
SetInfoLevel(InfoPackageLoading, PACKAGE_DEBUG);
SetPackagePath(info.PackageName, "/tmp/gaproot/pkg/$(basename $PWD)");
LoadPackage(info.PackageName);
if ${{ inputs.only-needed }} = true then
LoadPackage(info.PackageName : OnlyNeeded);
else
LoadPackage(info.PackageName);
fi;
SetInfoLevel(InfoPackageLoading, PACKAGE_ERROR);
Print("Now running tests from ", GAP_TESTFILE, "\n");
if EndsWith(GAP_TESTFILE, ".tst") then
QUIT_GAP(Test(GAP_TESTFILE, rec(compareFunction := "uptowhitespace")));
else
Expand Down