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

Use setup actions #202

Merged
merged 4 commits into from
Nov 8, 2024
Merged
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
27 changes: 13 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,22 @@ jobs:
uses: actions/[email protected]

- name: Install Pandoc
uses: r-lib/actions/setup[email protected]
uses: pandoc/actions/setup@v1.1.0
with:
pandoc-version: 3.1.6.1
version: 3.5

- name: Get Bats repository
uses: actions/[email protected]
- name: Install Bats
id: setup-bats
uses: bats-core/[email protected]
with:
repository: bats-core/bats-core
ref: v1.11.0
path: bats-core
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 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::"
Expand All @@ -49,4 +46,6 @@ jobs:
echo "::endgroup::"

- name: Run tests
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
run: bats --tap test
5 changes: 3 additions & 2 deletions test/bibliography.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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</h1>' docs/????-??-??-*.html
# Post contains bibliography; not a heading until jgm/pandoc#10367 is fixed
# grep -q 'id="bibliography".*>Bibliography</h1>' docs/????-??-??-*.html
grep -q '<p>Bibliography</p>' docs/????-??-??-*.html
}