Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update workflows #261

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

31 changes: 14 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,27 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up the repo
uses: tree-sitter/[email protected]
with:
node-version: ${{vars.NODE_VERSION}}
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Set up examples
shell: sh
shell: bash
run: |-
git clone https://github.com/Bash-it/bash-it examples/bash-it -q --single-branch --depth=1
git clone https://git.savannah.gnu.org/git/bash.git examples/bash -q --single-branch --depth=1
git clone https://anongit.gentoo.org/git/repo/gentoo.git examples/gentoo -q --single-branch --depth=1
if [[ '${{runner.os}}' != Windows ]]; then
if [[ $RUNNER_OS != Windows ]]; then
git clone https://github.com/oilshell/wild-corpus examples/wild-corpus -q --single-branch --depth=1
fi
- name: Read known failures
uses: actions/github-script@v7
id: known-failures
with:
result-encoding: string
script: "return require('fs').readFileSync('script/known-failures.txt', 'utf8')"
- name: Run tests
uses: tree-sitter/[email protected]
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
lint: ${{runner.os == 'Linux'}}
test-library: ${{runner.os == 'Linux'}}
corpus-files: |
files: |-
examples/*.sh
examples/bash-it/**/*.sh
examples/bash-it/**/*.bash
Expand All @@ -64,5 +60,6 @@ jobs:
examples/gentoo/**/*.eclass
examples/wild-corpus/**/*.sh
# examples/gentoo/**/*.ebuild
!examples/gentoo/app-antivirus/fangfrisch/files/fangfrisch-has-news.sh
!examples/gentoo/eclass/ruby-fakegem.eclass
${{steps.known-failures.outputs.result}}
invalid-files-list: script/known-failures.txt
16 changes: 12 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fuzz Parser
name: Fuzz

on:
push:
Expand All @@ -9,10 +9,18 @@ on:
- src/scanner.c
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
test:
name: Parser fuzzing
name: Fuzz scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/fuzz-action@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Run fuzzer
uses: tree-sitter/fuzz-action@v4
with:
corpus: examples
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on:
push:
branches: [master]
paths:
- grammar.js
pull_request:
paths:
- grammar.js

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{vars.NODE_VERSION}}
- name: Install modules
run: npm ci --legacy-peer-deps
- name: Run ESLint
run: npm run lint
3 changes: 0 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
* @license MIT
*/

/* eslint-disable arrow-parens */
/* eslint-disable camelcase */
/* eslint-disable-next-line spaced-comment */
/// <reference types="tree-sitter-cli/dsl" />
// @ts-check

Expand Down
Loading