forked from woefe/git-prompt.zsh
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (25 loc) · 942 Bytes
/
style_and_load.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
name: Style and load
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check against .editorconfig
run: |
curl -L https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.0.3/ec-linux-amd64.tar.gz | sudo tar -xzf - -C /
ec-linux-amd64 -exclude .git
- name: Check line length
run: |
sudo apt-get install -y gawk
set -o pipefail; find -name '*.zsh' -print0 | xargs -0 -L1 -I{} gawk '{if (length($0) > 100){printf("Line too long: %s:%d\n", FILENAME, NR); exit(1)}}' {}
- name: Load prompt
run: |
sudo apt-get install -y zsh
zsh -f -c 'source git-prompt.zsh; print -P $(_zsh_git_prompt_git_status)'