Skip to content

Instantly share code, notes, and snippets.

@ulises-jeremias
Forked from mhart/ci.yml
Created May 23, 2022 04:36
Show Gist options
  • Save ulises-jeremias/a33d9bc64587cdf6ec8ab2560e3f51ce to your computer and use it in GitHub Desktop.
Save ulises-jeremias/a33d9bc64587cdf6ec8ab2560e3f51ce to your computer and use it in GitHub Desktop.
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v1
- run: |
npm ci
find . -name '*.ts' -not -name '*.d.ts' -not -path './node_modules/*' | sort | \
awk "NR % $NUM_JOBS == $JOB" | xargs npm run tslint --
env:
NUM_JOBS: 5
JOB: ${{ matrix.job }}
{
"scripts": {
"tslint": "tslint -p tsconfig.json -t codeFrame"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment