mirror of
https://github.com/speed47/btrfs-list
synced 2024-09-29 20:33:35 +00:00
chore: add github workflow (#6)
This commit is contained in:
parent
e5f775cfc3
commit
317becb513
27
.github/workflows/check.yml
vendored
Normal file
27
.github/workflows/check.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install prerequisites
|
||||
run: sudo apt-get install -y perl libperl-critic-perl perltidy
|
||||
- name: perl check
|
||||
run: perl -c btrfs-list
|
||||
- name: perlcritic
|
||||
run: perlcritic btrfs-list
|
||||
- name: perltidy
|
||||
run: |
|
||||
perltidy --paren-tightness=2 --square-bracket-tightness=2 --brace-tightness=2 --maximum-line-length=180 btrfs-list
|
||||
if cmp btrfs-list btrfs-list.tdy; then
|
||||
echo "OK: perltidy didn't find any change to make"
|
||||
else
|
||||
echo "KO: perltidy found changes to make:"
|
||||
diff -u btrfs-list btrfs-list.tdy
|
||||
exit 1
|
||||
fi
|
|
@ -215,7 +215,7 @@ if (defined $opt_snap_max_used) {
|
|||
$opt_snap_max_used = human2raw($opt_snap_max_used);
|
||||
}
|
||||
|
||||
if ($opt_color eq 'never' || ($opt_color eq 'auto' && !-t 1)) {
|
||||
if ($opt_color eq 'never' || ($opt_color eq 'auto' && !-t 1)) { ## no critic
|
||||
$ENV{'ANSI_COLORS_DISABLED'} = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue