From e4aab55d8988dd4332b6ae96a558cc629c5120bd Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 5 Aug 2022 09:21:56 +0200 Subject: [PATCH 1/4] Print the name of the test file we end up using Helpful for debugging --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 709b82d..cc4a7a0 100644 --- a/action.yml +++ b/action.yml @@ -53,6 +53,7 @@ runs: SetPackagePath(info.PackageName, "/tmp/gaproot/pkg/$(basename $PWD)"); LoadPackage(info.PackageName); 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 From 640455406b179885d93568aafe77aa9c4dd123e8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 Jun 2023 18:42:38 +0200 Subject: [PATCH 2/4] Allow testing with only needed dependencies loaded --- action.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index cc4a7a0..7111f7e 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -33,6 +40,10 @@ runs: # start GAP with custom GAP root, to ensure correct package version is loaded GAP="$GAPROOT/bin/gap.sh -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 if [[ -z "${{ inputs.NO_COVERAGE }}" ]]; then @@ -51,7 +62,11 @@ 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 From 2a7f457a641c9344d8214b7b00eada83f34dc9c2 Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Wed, 29 Nov 2023 18:05:39 +0800 Subject: [PATCH 3/4] Change 'bin/gap.sh' to 'gap' as 'bin/gap.sh' has been removed (#26) --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7111f7e..9286911 100644 --- a/action.yml +++ b/action.yml @@ -38,7 +38,7 @@ 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" From 84bfaaa0fe95df1c75511924cc1fd081d95a2534 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 29 Nov 2023 11:09:27 +0100 Subject: [PATCH 4/4] Switch to actions/checkout@v4 --- .github/workflows/CI.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4b63050..3448041 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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-gap@v2 diff --git a/README.md b/README.md index a8d11c6..02b1e91 100644 --- a/README.md +++ b/README.md @@ -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