1name: Tests code style23on:4 pull_request:5 branches:6 - develop7 types:8 - opened9 - reopened10 - synchronize11 - ready_for_review1213jobs:14 code_style:15 runs-on: self-hosted-ci1617 steps:18 - name: Skip if pull request is in Draft19 # `if: github.event.pull_request.draft == true` should be kept here, at20 # the step level, rather than at the job level. The latter is not21 # recommended because when the PR is moved from "Draft" to "Ready to22 # review" the workflow will immediately be passing (since it was skipped),23 # even though it hasn't actually ran, since it takes a few seconds for24 # the workflow to start. This is also disclosed in:25 # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1726 # That scenario would open an opportunity for the check to be bypassed:27 # 1. Get your PR approved28 # 2. Move it to Draft29 # 3. Push whatever commits you want30 # 4. Move it to "Ready for review"; now the workflow is passing (it was31 # skipped) and "Check reviews" is also passing (it won't be updated32 # until the workflow is finished)33 if: github.event.pull_request.draft == true34 run: exit 13536 - uses: actions/checkout@v33738 - uses: actions/setup-node@v339 with:40 node-version: 164142 - name: Install modules43 run: cd tests && yarn44 - name: Run ESLint45 run: cd tests && yarn eslint --ext .ts,.js src/difftreelog
source
.github/workflows/tests_codestyle.yml1.5 KiBsourcehistory