Skip to content

Commit

Permalink
Update CI to run tests with perevir
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Aug 27, 2024
1 parent c03271d commit b2e0223
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
env:
pvurl: https://raw.githubusercontent.com/tarleb/perevir/v0.3.0/perevir.lua
container:
image: pandoc/minimal:latest-alpine

Expand All @@ -31,7 +33,10 @@ jobs:
uses: actions/checkout@v4

- name: Install dependencies
run: apk add make
run: apk add make curl

- name: Install local perevir
run: curl --output=test/perevir $pvurl

- name: Test
run: make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use perevir to run the test
test: test/perevirka.md
perevir $<
pandoc-lua test/perevir $<

# Ensure that the `test` target is run each time it's called.
.PHONY: test
10 changes: 10 additions & 0 deletions test/perevir
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env pandoc-lua
--- perevir – a test tool for pandoc transformations.
--
-- Copyright: © 2024 Albert Krewinkel <[email protected]>
-- License: MIT

local perevir = require 'perevir'

local opts = perevir.parse_args(arg)
perevir.do_checks(opts)

0 comments on commit b2e0223

Please sign in to comment.