diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e961944796..a2274c4a716 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: shellcheck uses: reviewdog/action-shellcheck@v1.19 @@ -46,7 +46,7 @@ jobs: outputs: files_changed: ${{ steps.changed_files.outputs.files_changed }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + - uses: actions/checkout@v4 with: persist-credentials: false fetch-depth: 0 @@ -123,7 +123,7 @@ jobs: if: needs.build.outputs.files_changed != 'true' steps: - name: Checkout into dir1 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} submodules: true @@ -163,7 +163,7 @@ jobs: path: dir2/dist - name: Checkout into dir2 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} submodules: true @@ -198,7 +198,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 @@ -256,7 +256,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 @@ -294,7 +294,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 @@ -332,7 +332,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: ${{ matrix.fetch-depth }} @@ -364,7 +364,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} @@ -383,18 +383,6 @@ jobs: shell: bash - - name: Run changed-files with since_last_remote_commit - id: changed-files-since-last-remote-commit - uses: ./ - with: - since_last_remote_commit: true - - - name: Show output - run: | - echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}' - shell: - bash - test-pull-request-without-persist-credentials: name: Test changed-files with pull request without persist credentials runs-on: ubuntu-latest @@ -408,7 +396,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: fetch-depth: ${{ matrix.fetch-depth }} persist-credentials: false @@ -437,7 +425,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Download build assets uses: actions/download-artifact@v3 @@ -491,7 +479,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 - name: Download build assets uses: actions/download-artifact@v3 @@ -546,7 +534,7 @@ jobs: pull-requests: read steps: - name: Checkout into dir1 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} submodules: true @@ -582,7 +570,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} submodules: recursive @@ -625,7 +613,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} submodules: recursive @@ -677,7 +665,7 @@ jobs: steps: - name: Checkout branch - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} submodules: recursive @@ -817,6 +805,43 @@ jobs: else cat "deleted_files/test/test deleted.txt" fi + + test-since-last-remote-commit: + name: Test changed-files since last remote commit + runs-on: ubuntu-latest + needs: build + if: needs.build.outputs.files_changed != 'true' + strategy: + fail-fast: false + max-parallel: 4 + matrix: + fetch-depth: [0, 1, 2] + + steps: + - name: Checkout branch + uses: actions/checkout@v4 + with: +# ref: ${{ github.event.pull_request.head.sha || github.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + submodules: true + fetch-depth: ${{ matrix.fetch-depth }} + + - name: Download build assets + uses: actions/download-artifact@v3 + with: + name: build-assets + + - name: Run changed-files with since_last_remote_commit + id: changed-files-since-last-remote-commit + uses: ./ + with: + since_last_remote_commit: true + + - name: Show output + run: | + echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}' + shell: + bash test: name: Test changed-files @@ -832,7 +857,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + uses: actions/checkout@v4 with: submodules: true repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -853,16 +878,6 @@ jobs: echo '${{ toJSON(steps.changed-files.outputs) }}' shell: bash - - name: Run changed-files with since_last_remote_commit - id: changed-files-since-last-remote-commit - uses: ./ - with: - since_last_remote_commit: true - - name: Show output - run: | - echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}' - shell: - bash - name: Run changed-files with dir name id: changed-files-dir-name uses: ./