Skip to content

Instantly share code, notes, and snippets.

@aviflax
Forked from mhart/ci.yml
Created September 29, 2019 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviflax/0e168de238360c63f28cac4a5057eb4d to your computer and use it in GitHub Desktop.
Save aviflax/0e168de238360c63f28cac4a5057eb4d 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