-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.4 KB
/
ci.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: CI
on:
pull_request:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "yarn"
- run: yarn install --check-files --frozen-lockfile --non-interactive
- id: fixpack
run: yarn fixpack
continue-on-error: true
- if: steps.fixpack.outcome == 'failure'
run: |
git -c "user.name=github-actions[bot]" -c "user.email=github-actions[bot]@users.noreply.github.com" commit -a -m "bot: fixpack"
git push origin HEAD
- id: lint
run: |
yarn lint
echo "::set-output name=status::$(git status --porcelain)"
- if: steps.lint.outputs.status != ''
run: |
git -c "user.name=github-actions[bot]" -c "user.email=github-actions[bot]@users.noreply.github.com" commit -a -m "bot: lint"
git push origin HEAD
- run: yarn test
- id: format
run: |
yarn format
echo "status=$(git diff --shortstat)" >> $GITHUB_OUTPUT
- if: steps.format.outputs.status != ''
run: |
git -c "user.name=github-actions[bot]" -c "user.email=github-actions[bot]@users.noreply.github.com" commit -a -m "bot: format"
git push origin HEAD
- run: yarn build