Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates code change to test pull request github test action #26

Merged
merged 2 commits into from Jan 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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