feat: enhance error handling for non-git directories (#1885)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
33
.github/workflows/test.yml
vendored
33
.github/workflows/test.yml
vendored
@@ -550,6 +550,39 @@ jobs:
|
||||
shell:
|
||||
bash
|
||||
|
||||
test-non-existing-repository:
|
||||
name: Test changed-files with non existing repository
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
pull-requests: read
|
||||
steps:
|
||||
- name: Checkout into dir1
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
path: dir1
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
|
||||
- name: Run changed-files with non existing repository
|
||||
id: changed-files
|
||||
continue-on-error: true
|
||||
uses: ./dir1
|
||||
|
||||
- name: Verify failed
|
||||
if: steps.changed-files.outcome != 'failure'
|
||||
run: |
|
||||
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
|
||||
exit 1
|
||||
|
||||
test-submodules:
|
||||
name: Test changed-files with submodule
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user