Skip to content
Draft
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
57 changes: 17 additions & 40 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ on:
jobs:
test-suite:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

name: Run test suite
if: github.repository == 'quarto-dev/quarto-markdown'

steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand All @@ -33,8 +34,8 @@ jobs:
if: runner.os == 'macOS'
uses: dtolnay/rust-toolchain@nightly

- name: Set up Rust nightly (Linux)
if: runner.os == 'Linux'
- name: Set up Rust nightly (using rustup)
if: runner.os == 'Linux' || runner.os == 'Windows'
run: rustup override set nightly
shell: bash

Expand All @@ -43,50 +44,26 @@ jobs:
shell: bash

# Pandoc setup
- name: Set up Pandoc (Linux)
if: runner.os == 'Linux'
run: |
curl -LO https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-1-amd64.deb
sudo dpkg -i pandoc-3.7.0.2-1-amd64.deb
shell: bash

- name: Set up Pandoc (macOS)
if: runner.os == 'macOS'
run: |
brew install pandoc
shell: bash
- name: Install pandoc
uses: pandoc/actions/setup@v1

# tree-sitter setup
- name: Set up tree-sitter CLI (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libc6-dev
sudo apt-get install gcc-multilib
curl -LO https://github.com/tree-sitter/tree-sitter/releases/download/v0.25.8/tree-sitter-linux-x86.gz
gunzip tree-sitter-linux-x86.gz
chmod +x tree-sitter-linux-x86
sudo mv tree-sitter-linux-x86 /usr/local/bin/tree-sitter

- name: Set up tree-sitter CLI (macOS)
if: runner.os == 'macOS'
run: brew install tree-sitter-cli
shell: bash
# tree-sitter CLI setup
- uses: tree-sitter/setup-action@v2
with:
install-lib: false

# build and run tests
- name: Build
run: cargo build
run: cargo build --workspace --exclude quarto-markdown-pandoc-fuzz
shell: bash

- name: Test inline tree-sitter grammar
run: |
cd crates/tree-sitter-qmd/tree-sitter-markdown-inline
tree-sitter test
working-directory: crates/tree-sitter-qmd/tree-sitter-markdown-inline
run: tree-sitter test

- name: Test block tree-sitter grammar
run: |
cd crates/tree-sitter-qmd/tree-sitter-markdown
tree-sitter test
working-directory: crates/tree-sitter-qmd/tree-sitter-markdown
run: tree-sitter test

- name: Test Rust code
run: cargo test
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
markdown-inline.dylib
markdown-inline.dylib

# windows
*.obj
*.lib
*.exp
Loading