-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test github workflow (#14)
add tests against multiple versions of antora, nodejs. Not yet working for asciidoctor 3.x
- Loading branch information
Showing
18 changed files
with
1,039 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Test against Antora Versions | ||
|
||
on: | ||
push: | ||
branches: [ '**' ] | ||
paths: | ||
- 'lib/antora/**' | ||
- 'test/**' | ||
- 'package.json' | ||
- '.github/workflows/test-antora.yml' | ||
pull_request: | ||
branches: [ '**' ] | ||
paths: | ||
- 'lib/antora/**' | ||
- 'test/**' | ||
- 'package.json' | ||
- '.github/workflows/test-antora.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
antora-version: ['~3.1', '3.2.0-alpha.8'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Install specific Antora version | ||
run: | | ||
npm install --no-save @antora/cli@${{ matrix.antora-version }} @antora/site-generator@${{ matrix.antora-version }} | ||
# Ensure Asciidoctor is at ~2.2 as required by Antora | ||
npm install --no-save @asciidoctor/core@~2.2 | ||
- name: Run Antora tests | ||
run: npx jest tests/antora |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Test against Asciidoctor Versions | ||
|
||
on: | ||
push: | ||
branches: [ '**' ] | ||
paths: | ||
- 'lib/**' | ||
- 'test/**' | ||
- 'package.json' | ||
- '.github/workflows/test-asciidoctor.yml' | ||
pull_request: | ||
branches: [ '**' ] | ||
paths: | ||
- 'lib/**' | ||
- 'test/**' | ||
- 'package.json' | ||
- '.github/workflows/test-asciidoctor.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
include: | ||
# Test with Asciidoctor 2.2 | ||
- asciidoctor-version: '~2.2' | ||
package-name: '@asciidoctor/core' | ||
node-version: '18.x' | ||
- asciidoctor-version: '~2.2' | ||
package-name: '@asciidoctor/core' | ||
node-version: '20.x' | ||
- asciidoctor-version: '~2.2' | ||
package-name: '@asciidoctor/core' | ||
node-version: '22.x' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Install specific Asciidoctor version | ||
run: npm install --no-save ${{ matrix.package-name }}@${{ matrix.asciidoctor-version }} | ||
|
||
- name: Run Asciidoctor tests | ||
run: npx jest tests/asciidoctor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# Run Antora with stacktrace for better error reporting | ||
npx antora --stacktrace "$1" 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.