Skip to content

chore(deps): update reviewdog/reviewdog to 0.17.5 (#85) #124

chore(deps): update reviewdog/reviewdog to 0.17.5 (#85)

chore(deps): update reviewdog/reviewdog to 0.17.5 (#85) #124

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
defaults:
run:
shell: bash
jobs:
test-check:
name: tflint (github-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: info
working_directory: tests/reviewdog-reporters
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [[ "$reviewdog_return" -eq 0 ]]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-pr-check:
if: github.event_name == 'pull_request'
name: tflint (github-pr-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: info
working_directory: tests/reviewdog-reporters
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [ "$reviewdog_return" -eq 0 ]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-pr-review:
if: github.event_name == 'pull_request'
name: tflint (github-pr-review)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: info
working_directory: tests/reviewdog-reporters
# The check is expected to fail on the test data
# but for forked PRs reviewdog will just output
# on the PR and report success
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [ "$reviewdog_return" -eq 0 ]; then
echo "reviewdog correctly returned failure: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-rulesets:
name: tflint (rulesets)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: info
tflint_rulesets: "azurerm google"
working_directory: tests/rulesets
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [[ "$reviewdog_return" -eq 0 ]]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-init:
name: tflint (init)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
working-directory: tests/init
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: info
tflint_init: true
working_directory: tests/init
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [[ "$reviewdog_return" -eq 0 ]]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-modules:
if: github.event_name == 'pull_request'
name: tflint (modules)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
working-directory: tests/modules
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: info
working_directory: tests/modules
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [[ "$reviewdog_return" -eq 0 ]]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi
test-operating-systems:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
name: tflint (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
id: test
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
level: info
working_directory: tests/reviewdog-reporters
# The check is expected to fail on the test data
- name: Check return codes
if: success() || failure ()
run: |
tflint_return="${{ steps.test.outputs.tflint-return-code }}"
reviewdog_return="${{ steps.test.outputs.reviewdog-return-code }}"
if [[ "$tflint_return" -eq 2 ]]; then
echo "tflint correctly returned failure ${tflint_return}"
else
echo "tflint returned ${tflint_return}, expected '2'. Failing..."
exit 1
fi
if [ "$reviewdog_return" -eq 0 ]; then
echo "reviewdog correctly returned success: ${reviewdog_return}"
else
echo "reviewdog returned ${reviewdog_return}, expected '0'. Failing..."
exit 1
fi