mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-20 11:01:56 +00:00
Updated test
This commit is contained in:
parent
e3cc088a96
commit
e7fd9e59a4
1 changed files with 75 additions and 29 deletions
104
.github/workflows/test.yml
vendored
104
.github/workflows/test.yml
vendored
|
@ -811,7 +811,81 @@ jobs:
|
|||
else
|
||||
cat "deleted_files/test/test deleted.txt"
|
||||
fi
|
||||
|
||||
|
||||
test-dir-names-deleted-files-include-only-deleted-dirs-single-file:
|
||||
name: Test dir names deleted files include only deleted dirs single file
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 920856cf
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
fetch-depth: 3
|
||||
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with a single file deleted withing the test directory
|
||||
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file
|
||||
uses: ./
|
||||
with:
|
||||
base_sha: 920856cf
|
||||
sha: a52f8621
|
||||
dir_names: true
|
||||
dir_names_deleted_files_include_only_deleted_dirs: true
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Check deleted_files output
|
||||
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files != ''
|
||||
run: |
|
||||
echo "Invalid output: Expected '' got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files }})"
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
test-dir-names-deleted-files-include-only-deleted-dirs-directory:
|
||||
name: Test dir names deleted files include only deleted dirs
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 920856cf
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
fetch-depth: 3
|
||||
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with the test directory deleted
|
||||
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory
|
||||
uses: ./
|
||||
with:
|
||||
base_sha: 920856cf
|
||||
sha: cd1e384
|
||||
dir_names: true
|
||||
dir_names_deleted_files_include_only_deleted_dirs: true
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Check deleted_files output on non windows platform
|
||||
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files != 'test/test3' && runner.os != 'Windows'
|
||||
run: |
|
||||
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
- name: Check deleted_files output on windows platform
|
||||
if: "!contains(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files, 'test\\test3') && runner.os == 'Windows'"
|
||||
run: |
|
||||
echo "Invalid output: Expected (test\\test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
|
||||
test-since-last-remote-commit:
|
||||
name: Test changed-files since last remote commit
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -1055,34 +1129,6 @@ jobs:
|
|||
exit 1
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with the test directory deleted
|
||||
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory
|
||||
uses: ./
|
||||
with:
|
||||
base_sha: 920856cf
|
||||
sha: cd1e384
|
||||
fetch_depth: 60000
|
||||
dir_names: true
|
||||
dir_names_deleted_files_include_only_deleted_dirs: true
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Check deleted_files output on non windows platform
|
||||
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files != 'test/test3' && runner.os != 'Windows'
|
||||
run: |
|
||||
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
- name: Check deleted_files output on windows platform
|
||||
if: "!contains(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files, 'test\\test3') && runner.os == 'Windows'"
|
||||
run: |
|
||||
echo "Invalid output: Expected (test\\test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with dir_names and dir_names_include_files with specific files
|
||||
id: changed-files-dir-names-specific-include-files
|
||||
uses: ./
|
||||
|
|
Loading…
Add table
Reference in a new issue