diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 061c87a76a..f78d257bf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,16 @@ jobs: toolchain: nightly override: true - name: Checkout + if: github.event_name != 'pull_request' uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Checkout + if: github.event_name == 'pull_request' + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - name: Run tests run: | export CARGO_INCREMENTAL=0