Merge branch 'linter-bug'

pull/110/head
Dave Musicant / thinkpad 2 years ago
commit 9772832381

@ -1,3 +1,4 @@
---
name: Gitwatch QA
on:
@ -9,7 +10,7 @@ on:
workflow_dispatch:
jobs:
#-----------------------------------------------------------------------------
#-------------------------------------------------------------------------
super-lint:
name: Lint Code Base
@ -25,18 +26,23 @@ jobs:
with:
fetch-depth: 0
- name: Run Super-Linter
uses: github/super-linter@v3
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Linter is having errors at symbolic link, appears to be
# this bug:
# https://github.com/github/super-linter/issues/1400
# https://github.com/kucherenko/jscpd/issues/481
FILTER_REGEX_EXCLUDE: \.github/linters/\.markdown-lint.yml
#-----------------------------------------------------------------------------
# For the time being, I'm giving up on Super Linter. It's a great tool,
# but it's currently broken, and it's taking more time to make it work than
# it's worth.
# - name: Lint Code Base
# uses: github/super-linter@v4
# env:
# DEFAULT_BRANCH: master
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # Linter is having errors at symbolic link, appears to be
# # this bug:
# # https://github.com/github/super-linter/issues/1400
# # https://github.com/kucherenko/jscpd/issues/481
# # Test files are bats files, which don't follow bash standards
# # FILTER_REGEX_EXCLUDE: \.github/linters/\.markdown-lint.yml | tests\.*
# # FILTER_REGEX_EXCLUDE: tests\.*
#-------------------------------------------------------------------------
bats:
name: BATS Tests

@ -21,3 +21,5 @@ MD007:
# We don't care about inline HTML
MD033: false
# Removing eval as recommended broke code; might fix later, but not now
SC2294: false

@ -7,9 +7,9 @@
load startup-shutdown
@test "commit log messages working" {
function commit_log_messages_working { #@test
# Start up gitwatch with logging, see if works
${BATS_TEST_DIRNAME}/../gitwatch.sh -l 10 "$testdir/local/remote" 3>&- &
"${BATS_TEST_DIRNAME}"/../gitwatch.sh -l 10 "$testdir/local/remote" 3>&- &
GITWATCH_PID=$!
# Keeps kill message from printing to screen
@ -25,11 +25,11 @@ load startup-shutdown
# Wait a bit for inotify to figure out the file has changed, and do its add,
# and commit
sleep $WAITTIME
sleep "$WAITTIME"
# Make a new change
echo "line2" >> file1.txt
sleep $WAITTIME
sleep "$WAITTIME"
# Check commit log that the diff is in there
run git log -1 --oneline

@ -7,7 +7,7 @@
load startup-shutdown
@test "remote git dirs working, with commit logging" {
function remote_git_dirs_working_with_commit_logging { #@test
# Move .git somewhere else
dotgittestdir=$(mktemp -d)
mv "$testdir/local/remote/.git" "$dotgittestdir"

@ -7,7 +7,7 @@
load startup-shutdown
@test "commit only when git status change" {
function commit_only_when_git_status_change { #@test
# Start up gitwatch and capture its output
${BATS_TEST_DIRNAME}/../gitwatch.sh "$testdir/local/remote" > "$testdir/output.txt" 3>&- &

@ -7,7 +7,7 @@
load startup-shutdown
@test "syncing correctly" {
function syncing_correctly { #@test
# Start up gitwatch and see if commit and push happen automatically
# after waiting two seconds
${BATS_TEST_DIRNAME}/../gitwatch.sh -r origin "$testdir/local/remote" 3>- &

Loading…
Cancel
Save