From e673640f2d8f95eba35285816d18e7f4a33345e5 Mon Sep 17 00:00:00 2001 From: Auke van Slooten Date: Thu, 4 Apr 2024 13:31:05 +0200 Subject: [PATCH 1/3] add github actions to run tests --- .github/workflows/run-tests.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..71ee861 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,23 @@ +--- +name: Run tap tests + +on: + - push + - pull_request + # Allow manually triggering the workflow. + - workflow_dispatch + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install + - run: npm test + \ No newline at end of file From 00873bb5482b150aba1b896984158077328c79a7 Mon Sep 17 00:00:00 2001 From: Auke van Slooten Date: Thu, 4 Apr 2024 13:33:00 +0200 Subject: [PATCH 2/3] fixed typo in test --- test/oldm.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/oldm.mjs b/test/oldm.mjs index 9a6c46c..2ebc429 100644 --- a/test/oldm.mjs +++ b/test/oldm.mjs @@ -74,7 +74,7 @@ tap.test('two graphs merging', t => { t.end() }) -tap.test('seperator', t => { +tap.test('separator', t => { let turtle = ` @prefix : <#>. @prefix schema: . @@ -88,7 +88,7 @@ tap.test('seperator', t => { 'schema':'https://schema.org/', 'vcard':'http://www.w3.org/2006/vcard/ns#' }, - seperator: ':' + separator: ':' }) let data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me') t.same(''+data['vcard:fn'], 'Auke van Slooten') @@ -115,7 +115,7 @@ tap.test('xsdtypes', t => { 'schema':'https://schema.org/', 'vcard':'http://www.w3.org/2006/vcard/ns#' }, -// seperator: ':' +// separator: ':' }) let data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me') t.same(''+data.vcard$bday, '1972-09-20') @@ -126,7 +126,7 @@ tap.test('xsdtypes', t => { 'schema':'https://schema.org/', 'vcard':'http://www.w3.org/2006/vcard/ns#' }, - seperator: ':' + separator: ':' }) data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me') t.same(''+data['vcard:bday'], '1972-09-20') From 7c4fc061309a4e6c35470174c464acce9dd1a3f9 Mon Sep 17 00:00:00 2001 From: Auke van Slooten Date: Thu, 4 Apr 2024 13:34:45 +0200 Subject: [PATCH 3/3] only run on pull requests, protect master branch from direct pushes --- .github/workflows/run-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 71ee861..40f6389 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,7 +2,6 @@ name: Run tap tests on: - - push - pull_request # Allow manually triggering the workflow. - workflow_dispatch