-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.09 KB
/
pull-request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Lint, Test, and Danger
on: pull_request
jobs:
lint-test-danger:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_DECRAPIFIER }}
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn run lint:ci || touch FAIL_JOB
- name: Test
run: yarn run test:ci || touch FAIL_JOB
- name: Setup Decrapifier user
run: |
git config user.email "[email protected]"
git config user.name "Decrapifier"
git config push.default upstream
git checkout --track origin/${{github.head_ref}}
- name: Run danger
run: yarn run danger ci || touch FAIL_JOB
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.PAT_DECRAPIFIER }}
- name: check-if-lint-or-test-runs-failed
run: 'if test -f "FAIL_JOB"; then exit 1; fi'