-
Notifications
You must be signed in to change notification settings - Fork 14
147 lines (124 loc) · 4.34 KB
/
Copy pathts-test-suite.yml
File metadata and controls
147 lines (124 loc) · 4.34 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: TS Test Suite
on:
workflow_dispatch:
push:
branches:
- main
- kyoto
pull_request:
branches:
- main
- kyoto
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PANDOC_VERSION: "3.8.3"
jobs:
test-suite:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: Run test suite
if: github.repository == 'quarto-dev/q2'
steps:
- name: Checkout Repo
uses: actions/checkout@v6
# Fix mtimes IMMEDIATELY after checkout, before anything else
- name: Restore file modification times
shell: bash
run: |
git ls-files | while read file; do
time=$(git log -1 --format='@%ct' -- "$file" 2>/dev/null || echo '@0')
[ "$time" != "@0" ] && touch -d "$time" "$file" 2>/dev/null || true
done
- name: Set up Homebrew
if: runner.os == 'macOS'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
# Consistent Rust setup for both platforms. Use the named `@nightly`
# ref (not `@master`, which hard-errors without an explicit
# `toolchain:` input) — it installs the nightly toolchain; cargo
# then reads the pinned dated nightly from rust-toolchain.toml
# (bd-at72) at build time. Matches the existing pattern on main.
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
components: rust-src
- name: Output rust version
shell: bash
run: rustup --version
# # Cache Rust AFTER toolchain is set up
# - name: Cache Rust dependencies
# uses: Swatinem/rust-cache@v2
# with:
# cache-on-failure: true
# Cache cargo-nextest and insta separately to avoid reinstalling
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install cargo-insta
uses: taiki-e/install-action@v2
with:
tool: cargo-insta
# Pandoc setup (pinned to match Quarto 1.9)
- name: Set up Pandoc (Linux)
if: runner.os == 'Linux'
run: |
curl -LO "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb"
sudo dpkg -i "pandoc-${PANDOC_VERSION}-1-amd64.deb"
shell: bash
- name: Set up Pandoc (macOS)
if: runner.os == 'macOS'
run: |
curl -LO "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-arm64-macOS.pkg"
sudo installer -pkg "pandoc-${PANDOC_VERSION}-arm64-macOS.pkg" -target /
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 -y libc6-dev 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
# TypeScript workspace build
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install npm dependencies
shell: bash
run: npm ci
# WASM build for hub-client (must happen before TypeScript build)
- name: Set up Clang (Linux)
if: runner.os == 'Linux'
uses: egor-tensin/setup-clang@v2
with:
version: latest
platform: x64
- name: Set up LLVM (macOS)
if: runner.os == 'macOS'
run: brew install llvm
shell: bash
- name: Install wasm-bindgen-cli
shell: bash
run: cargo install wasm-bindgen-cli --version 0.2.108
- name: Build WASM module
shell: bash
run: |
cd hub-client
npm run build:all
- name: Run hub-client tests
shell: bash
run: |
cd hub-client
npm run test:ci