-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1018 Bytes
/
test.yml
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
name: Test
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: oven-sh/setup-bun@v1
- uses: reviewdog/action-setup@v1
- run: bun install --frozen-lockfile
- run: bun run format
- id: files-formatted
run: |
echo "formatted=$(git diff-index --quiet HEAD && echo false || echo true)" >> "$GITHUB_OUTPUT"
- name: commit formatted files
run: |
git config user.email '139195068+fohte-bot[bot]@users.noreply.github.com'
git config user.name 'fohte-bot[bot]'
git add .
git commit -m 'style: $ bun run format'
git push
if: steps.files-formatted.outputs.formatted == 'true'
- run: bun run test