Skip to content

Commit

Permalink
💚 Updates aciton test gh-action (#26)
Browse files Browse the repository at this point in the history
* 💚 Improves action tests

* 💚 Updates gh action test
  • Loading branch information
rickstaa committed Jan 3, 2021
1 parent 4f5e9f6 commit 0855fb3
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -16,6 +16,15 @@ jobs:
reporter: github-check
level: info
workdir: ./testdata/
- name: Check if code is left untouched (not formatted)
run: |
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
else
echo "Changes detected!"
exit 1
fi
test-check-format:
name: runner / black-format (github-check-format)
Expand All @@ -31,7 +40,7 @@ jobs:
workdir: ./testdata/
- name: Check if formatting was successful
run: |
changed_files=$(git status --porcelain --untracked-files=no | wc -l)
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
exit 1
Expand All @@ -51,6 +60,15 @@ jobs:
reporter: github-pr-check
level: warning
workdir: ./testdata/
- name: Check if code is left untouched (not formatted)
run: |
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
else
echo "Changes detected!"
exit 1
fi
test-pr-check-format:
if: github.event_name == 'pull_request'
Expand All @@ -67,7 +85,7 @@ jobs:
workdir: ./testdata/
- name: Check if formatting was successful
run: |
changed_files=$(git status --porcelain --untracked-files=no | wc -l)
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
exit 1
Expand All @@ -88,6 +106,15 @@ jobs:
level: error
reviewdog_flags: -filter-mode=file -fail-on-error
workdir: ./testdata/
- name: Check if code is left untouched (not formatted)
run: |
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
else
echo "Changes detected!"
exit 1
fi
test-pr-review-format:
if: github.event_name == 'pull_request'
Expand All @@ -105,7 +132,7 @@ jobs:
workdir: ./testdata/
- name: Check if formatting was successful
run: |
changed_files=$(git status --porcelain --untracked-files=no | wc -l)
changed_files=$(git status --porcelain | wc -l)
if [[ ${changed_files} -eq 0 ]]; then
echo "No changes detected!"
exit 1
Expand Down

0 comments on commit 0855fb3

Please sign in to comment.