Skip to content

Commit

Permalink
Edited lint-ts to check for ts folders and to run globally
Browse files Browse the repository at this point in the history
  • Loading branch information
avifenesh committed Mar 6, 2024
1 parent 220b826 commit 1a97371
Showing 1 changed file with 31 additions and 37 deletions.
68 changes: 31 additions & 37 deletions .github/workflows/lint-ts.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
name: lint-ts

on:
push:
branches: ["main"]
paths:
- benchmarks/node/**
- node/**
- benchmarks/utilities/*
- .github/workflows/lint-ts.yml
pull_request:
paths:
- benchmarks/node/**
- node/**
- benchmarks/utilities/*
- .github/workflows/lint-ts.yml
push:
branches: ["main"]
paths:
- benchmarks/node/**
- node/**
- benchmarks/utilities/*
- .github/workflows/lint-ts.yml
pull_request:
paths:
- benchmarks/node/**
- node/**
- benchmarks/utilities/*
- .github/workflows/lint-ts.yml

env:
CARGO_TERM_COLOR: always
jobs:
job:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
CARGO_TERM_COLOR: always

- uses: ./.github/workflows/lint-ts
with:
package-folder: ./node
name: lint node
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10

- uses: ./.github/workflows/lint-ts
with:
package-folder: ./benchmarks/node
name: lint benchmark
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: ./.github/workflows/lint-ts
with:
package-folder: ./benchmarks/utilities
name: lint benchmark utilities
- name: Install dependencies
run: |
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier prettier
- name: lint ts
run: |
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier
npm i
npx eslint .
- name: Run linting and prettier
run: |
for folder in node benchmarks/node benchmarks/utilities; do
npx eslint ${{ github.workspace }}/$folder
npx prettier --check ${{ github.workspace }}/$folder
done

0 comments on commit 1a97371

Please sign in to comment.