Skip to content

Commit

Permalink
ci: use upstream actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Feb 28, 2024
1 parent 52b3783 commit c23bd31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test grammar
name: CI

on:
push:
Expand Down Expand Up @@ -29,7 +29,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter-grammars/actions/setup@main
uses: tree-sitter/parser-setup-action@v1.1
with:
node-version: ${{vars.NODE_VERSION}}
- name: Clone examples
Expand All @@ -40,21 +40,22 @@ jobs:
sparse-checkout: org.eclipse.lemminx/src/test/resources
ref: 6b12cd0a89205c2791ef1240e0d8401103f8c9a9
- name: Run tests
uses: tree-sitter-grammars/actions/test@main
uses: tree-sitter/parser-test-action@v1.2
with:
test-library: ${{runner.os == 'Linux'}}
examples: |-
corpus-files: |-
examples/lemminx/org.eclipse.lemminx/src/test/resources/catalogs/
examples/lemminx/org.eclipse.lemminx/src/test/resources/xml-model/
examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/
examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/empty.xsd
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-invalid-syntax.xsd
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-ns-invalid-syntax.xsd
!examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/foo-invalid.dtd
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/largeFile.xml
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/content.xml
invalid-files: |-
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-invalid-syntax.xsd
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-ns-invalid-syntax.xsd
examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/foo-invalid.dtd
fuzz:
name: Fuzz parsers
runs-on: ubuntu-latest
Expand All @@ -73,7 +74,7 @@ jobs:
common/scanner.h
${{matrix.language}}/src/scanner.c
- name: Fuzz ${{matrix.language}} parser
uses: tree-sitter-grammars/tree-sitter-fuzz-action@v3
uses: tree-sitter/fuzz-action@v4
if: steps.scanner-changes.outputs.any_changed == 'true'
with:
directory: ${{matrix.language}}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:

jobs:
npm:
uses: tree-sitter-grammars/.github/.github/workflows/package-npm.yml@main
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
with:
package-name: "@tree-sitter-grammars/tree-sitter-xml"
secrets:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
crates:
uses: tree-sitter-grammars/.github/.github/workflows/package-crates.yml@main
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
2 changes: 1 addition & 1 deletion xml/src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline void vec_clear(Vector *vec) {
vec->len = 0;
}

/// Push an element to a vector
/// Push a character to a string
static inline void string_push(String *string, char data) {
if (string->cap == string->len) {
uint32_t cap = MAX(STRING_CAP, string->len << 1);
Expand Down

0 comments on commit c23bd31

Please sign in to comment.