-
-
Notifications
You must be signed in to change notification settings - Fork 22
executable file
·54 lines (54 loc) · 1.43 KB
/
dorothy.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: dorothy
'on':
- push
- pull_request
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
env:
DOROTHY: ${{ github.workspace }}
NO_TTY: yes
VERBOSE: yes
CI_COMMIT_MESSAGE: 'ci: adjustments'
CI_COMMIT_NAME: 'Continuous Integration'
CI_COMMIT_EMAIL: '[email protected]'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Cache XDG'
id: cache-xdg
uses: actions/cache@v3
with:
path: ~/.local
key: ${{ runner.os }}
- name: 'Configure'
shell: bash
run: |
chmod +x "$DOROTHY/commands/"*
source "$DOROTHY/sources/login.sh"
dorothy dev
- name: 'Format'
if: github.event_name == 'push'
shell: bash
run: |
source "$DOROTHY/sources/login.sh"
dorothy format || :
if git diff --quiet &>/dev/null; then
echo 'Already formatted.'
else
git config --global user.name "${{ env.CI_COMMIT_NAME }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push
fi
- name: 'Trunk Check'
uses: trunk-io/trunk-action@v1
- name: 'Test'
shell: bash
run: |
source "$DOROTHY/sources/login.sh"
dorothy format