1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make doxygen / coverage torelant to clone race

a little.

Doing both `git clone --depth=1` and `git reset --hard ${sha}` does not
make sense (the latter command either does nothing or just fails), so I
added non-1 value as a depth.

Maybe we don't need depth=50 for pull_request and schedule, so it's 10
for now.
This commit is contained in:
Takashi Kokubun 2019-08-28 00:13:54 +09:00
parent 9928a6a367
commit dd032a5fb4
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD
2 changed files with 4 additions and 4 deletions

View file

@ -19,12 +19,12 @@ jobs:
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- name: Checkout ruby/ruby
run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
env:
GITHUB_SHA: ${{ github.sha }}
if: github.event_name == 'schedule'
- name: Checkout a pull request
run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
env:
GITHUB_REV: ${{ github.event.pull_request.head.sha }}
GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}

View file

@ -19,12 +19,12 @@ jobs:
# Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
- name: Checkout ruby/ruby
run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
env:
GITHUB_SHA: ${{ github.sha }}
if: github.event_name == 'schedule'
- name: Checkout a pull request
run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
env:
GITHUB_REV: ${{ github.event.pull_request.head.sha }}
GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}