-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure rust grammar is available in CI
- Loading branch information
1 parent
50cee1c
commit fc61878
Showing
4 changed files
with
72 additions
and
24 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 |
---|---|---|
|
@@ -14,8 +14,6 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -53,8 +51,6 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -81,6 +77,28 @@ jobs: | |
path: target | ||
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache test tree-sitter-grammar | ||
uses: actions/[email protected] | ||
with: | ||
path: runtime/grammars | ||
key: ${{ runner.os }}-v2-tree-sitter-grammars-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- run: cp .github/workflows/languages.toml ./languages.toml | ||
|
||
- name: Download test tree-sitter grammar | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: ${{ matrix.cross }} | ||
command: run | ||
args: -- --fetch-grammars | ||
|
||
- name: Build test tree-sitter grammar | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: ${{ matrix.cross }} | ||
command: run | ||
args: -- --build-grammars | ||
|
||
- name: Run cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -97,8 +115,6 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
@@ -144,8 +160,6 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
|
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,26 @@ | ||
# This languages.toml is used for testing in CI. | ||
|
||
[[language]] | ||
name = "rust" | ||
scope = "source.rust" | ||
injection-regex = "rust" | ||
file-types = ["rs"] | ||
comment-token = "//" | ||
roots = ["Cargo.toml", "Cargo.lock"] | ||
indent = { tab-width = 4, unit = " " } | ||
|
||
[[grammar]] | ||
name = "rust" | ||
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" } | ||
|
||
[[language]] | ||
name = "nix" | ||
scope = "source.nix" | ||
injection-regex = "nix" | ||
file-types = ["nix"] | ||
shebangs = [] | ||
roots = [] | ||
comment-token = "#" | ||
|
||
# A grammar entry is not necessary for this language - it is only used for | ||
# testing TOML merging behavior. |
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