chore(deps): update actions/checkout action to v4 #944
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- '**' | |
jobs: | |
shellcheck: | |
name: Run shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: shellcheck | |
uses: reviewdog/[email protected] | |
test: | |
name: Test verify-changed-files | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, windows-2022] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Test files has no changes | |
uses: ./ | |
id: changed_files_not_expected | |
with: | |
files: | | |
test/*.txt | |
test/*.sql | |
test/**/*.txt | |
test/**/*.sql | |
- name: Display changed files | |
if: steps.changed_files_not_expected.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files (Not expected): ${{ steps.changed_files_not_expected.outputs.changed_files }}" | |
exit 1 | |
- name: Test dont fail if not changed | |
uses: ./ | |
id: changed_files_not_expected_fail | |
with: | |
fail-if-changed: true | |
files: | | |
test/*.txt | |
test/*.sql | |
test/**/*.txt | |
test/**/*.sql | |
- name: Make changes | |
run: | | |
printf '%s\n' "323442" "424" >> test/new.txt | |
printf '%s\n' "323442" "424" >> test/new1.txt | |
printf '%s\n' "323442" "424" >> test/new2.txt | |
- name: Test test/new.txt file has changes | |
uses: ./ | |
id: changed_files_expected | |
with: | |
separator: '\n' | |
files: | | |
test/*.txt | |
test/*.sql | |
test/**/*.txt | |
test/**/*.sql | |
- name: Display changed files | |
if: steps.changed_files_expected.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.changed_files_expected.outputs.changed_files }}" | |
- name: Verify Changes to test/new.txt | |
if: steps.changed_files_expected.outputs.files_changed != 'true' | |
run: | | |
echo "No Changes found: (Not expected)" | |
exit 1 | |
- name: Test fail if changed | |
uses: ./ | |
id: changed_files_expected_fail | |
continue-on-error: true | |
with: | |
fail-if-changed: true | |
files: | | |
test/*.txt | |
test/*.sql | |
test/**/*.txt | |
test/**/*.sql | |
- name: Generate an unstaged file | |
run: | | |
echo "New changes" > unstaged.txt | |
- name: Test unstaged file has changes | |
uses: ./ | |
id: changed_unstaged_files_expected | |
with: | |
files: | | |
unstaged.txt | |
- name: Display unstaged changed files | |
if: steps.changed_unstaged_files_expected.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.changed_unstaged_files_expected.outputs.changed_files }}" | |
- name: Verify Changes to unstaged.txt | |
if: steps.changed_unstaged_files_expected.outputs.files_changed != 'true' | |
run: | | |
echo "No Changes found: (Not expected)" | |
exit 1 | |
- name: Test unstaged file changes are ignored | |
uses: ./ | |
id: changed_unstaged_files_not_expected | |
with: | |
files: | | |
!test/new.txt | |
!test/new1.txt | |
!test/new2.txt | |
!unstaged.txt | |
- name: Verify Changes to unstaged.txt are ignored | |
if: steps.changed_unstaged_files_not_expected.outputs.files_changed != 'false' | |
run: | | |
echo "Changes found: (Not expected)" | |
exit 1 | |
- name: Test unstaged file has changes | |
uses: ./ | |
id: changed_unstaged2_files_expected | |
with: | |
files: | | |
!test/new.txt | |
!test/new1.txt | |
!test/new2.txt | |
unstaged.txt | |
- name: Verify Changes to unstaged.txt are ignored | |
if: steps.changed_unstaged2_files_expected.outputs.files_changed != 'true' | |
run: | | |
echo "No Changes found: (Not expected)" | |
exit 1 |