From 2b325582a1fd9d6c4cab62fc41860ca5bf000929 Mon Sep 17 00:00:00 2001 From: Benjamin Wuethrich Date: Thu, 7 Nov 2024 16:35:26 +0100 Subject: [PATCH 1/4] Use official pandoc action --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5e4a05..8d978db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,9 +21,9 @@ jobs: uses: actions/checkout@v4.2.2 - name: Install Pandoc - uses: r-lib/actions/setup-pandoc@v2.10.1 + uses: pandoc/actions/setup@v1.1.0 with: - pandoc-version: 3.1.6.1 + version: 3.5 - name: Get Bats repository uses: actions/checkout@v4.2.2 From 4b4cf96d833372ff5db193a0ef3f6eccc243045f Mon Sep 17 00:00:00 2001 From: Benjamin Wuethrich Date: Fri, 8 Nov 2024 13:03:15 +0100 Subject: [PATCH 2/4] Update test for pandoc bug --- test/bibliography.bats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/bibliography.bats b/test/bibliography.bats index 6466b55..4e5f65a 100644 --- a/test/bibliography.bats +++ b/test/bibliography.bats @@ -24,6 +24,7 @@ load test_helper cat docs/????-??-??-*.html grep -Pqz 'data-cites="Ritchie1974">\(Ritchie\sand\sThompson\s1974\)' docs/????-??-??-*.html - # Post contains bibliography - grep -q 'id="bibliography".*>Bibliography' docs/????-??-??-*.html + # Post contains bibliography; not a heading until jgm/pandoc#10367 is fixed + # grep -q 'id="bibliography".*>Bibliography' docs/????-??-??-*.html + grep -q '

Bibliography

' docs/????-??-??-*.html } From 0eb49ebc8398b5b47fbd9afb099e1e28c158d0a9 Mon Sep 17 00:00:00 2001 From: Benjamin Wuethrich Date: Fri, 8 Nov 2024 13:07:20 +0100 Subject: [PATCH 3/4] Use action to install Bats --- .github/workflows/test.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d978db..1977501 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,21 +25,11 @@ jobs: with: version: 3.5 - - name: Get Bats repository - uses: actions/checkout@v4.2.2 - with: - repository: bats-core/bats-core - ref: v1.11.0 - path: bats-core + - name: Install Bats + uses: bats-core/bats-action@3.0.0 - - name: Install dependencies + - name: Install other dependencies run: | - echo "::group::Install BATS" - cd bats-core - ./install.sh "$HOME" - printf '%s\n' "$HOME/bin" "$HOME/.local/bin" >> "$GITHUB_PATH" - echo "::endgroup::" - echo "::group::Install graphviz" sudo apt-get install graphviz echo "::endgroup::" From 8b9d45eb5dd44c5e5bd5089d14bb1b57910f01ef Mon Sep 17 00:00:00 2001 From: Benjamin Wuethrich Date: Fri, 8 Nov 2024 13:15:04 +0100 Subject: [PATCH 4/4] Set paths for Bats libraries --- .github/workflows/test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1977501..f4d3c34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,14 @@ jobs: version: 3.5 - name: Install Bats + id: setup-bats uses: bats-core/bats-action@3.0.0 + with: + bats-version: v1.11.0 + support-path: ${{ github.workspace }}/tests/bats-support + assert-path: ${{ github.workspace }}/tests/bats-assert + detik-path: ${{ github.workspace }}/tests/bats-detik + file-path: ${{ github.workspace }}/tests/bats-file - name: Install other dependencies run: | @@ -39,4 +46,6 @@ jobs: echo "::endgroup::" - name: Run tests + env: + BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }} run: bats --tap test