Skip to content

Commit daae04f

Browse files
committed
check for linguist compatibility in CI
1 parent c54111a commit daae04f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,26 @@ jobs:
7272
env:
7373
QDK_SAMPLES: ${{ github.workspace }}/qdk/samples
7474
run: npm test
75+
76+
# Verifies the grammar compiles with GitHub Linguist's grammar compiler, so
77+
# regressions (e.g. variable-length lookbehinds) are caught before they'd
78+
# break syntax highlighting on GitHub.com.
79+
# See https://github.com/github-linguist/linguist/issues/3924#issuecomment-2960632465
80+
linguist:
81+
runs-on: ubuntu-latest
82+
env:
83+
REPO_PATH: qsharp-tmLanguage
84+
steps:
85+
- name: Checkout linguist
86+
uses: actions/checkout@v4
87+
with:
88+
repository: github-linguist/linguist
89+
90+
- name: Checkout current repo/PR as submodule
91+
uses: actions/checkout@v4
92+
with:
93+
path: vendor/grammars/${{ env.REPO_PATH }}
94+
clean: false
95+
96+
- name: Compile linguist grammar
97+
run: script/grammar-compiler add vendor/grammars/${{ env.REPO_PATH }}

0 commit comments

Comments
 (0)