-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (79 loc) · 2.59 KB
/
test-suite.yml
File metadata and controls
93 lines (79 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Tests a broad set of Quarto functionality that users are likely to encounter.
# A failure indicates some signficant portion of functionality is likely to be broken.
name: Test Suite
on:
push:
# only trigger on branches, not on tags
branches:
- main
pull_request:
branches:
- main
jobs:
test-suite:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: Run test suite
if: github.repository == 'quarto-dev/quarto-markdown'
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Homebrew
if: runner.os == 'macOS'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
# Rust setup
- name: Set up Rust nightly (macOS)
if: runner.os == 'macOS'
uses: dtolnay/rust-toolchain@nightly
- name: Set up Rust nightly (Linux)
if: runner.os == 'Linux'
run: rustup override set nightly
shell: bash
- name: Output rust version
run: rustup --version
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
# 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
# build and run tests
- name: Build
run: cargo build
shell: bash
- name: Test inline tree-sitter grammar
run: |
cd crates/tree-sitter-qmd/tree-sitter-markdown-inline
tree-sitter test
- name: Test block tree-sitter grammar
run: |
cd crates/tree-sitter-qmd/tree-sitter-markdown
tree-sitter test
- name: Test Rust code
run: cargo test
shell: bash