tests: Fix missing commit in "Upgrade from latest release" workflow

pull/5013/head
Richard Hansen 2021-04-20 12:20:18 -04:00
parent 96208e8239
commit c2ac5e6145
1 changed files with 9 additions and 1 deletions

View File

@ -60,10 +60,18 @@ jobs:
- name: Run the backend tests
run: cd src && npm test
# Because actions/checkout@v2 is called with "ref: master" and without
# "fetch-depth: 0", the local clone does not have the ${GITHUB_SHA} commit.
# Fetch ${GITHUB_REF} to get the ${GITHUB_SHA} commit. Note that a plain
# "git fetch" only fetches "normal" references (refs/heads/* and
# refs/tags/*), and for pull requests none of the normal references include
# ${GITHUB_SHA}, so we have to explicitly tell Git to fetch ${GITHUB_REF}.
- name: Fetch the new Git commits
run: git fetch
run: git fetch --depth=1 origin "${GITHUB_REF}"
- name: Upgrade to the new Git revision
# For pull requests, ${GITHUB_SHA} is the automatically generated merge
# commit that merges the PR's source branch to its destination branch.
run: git checkout "${GITHUB_SHA}"
- name: Install all dependencies and symlink for ep_etherpad-lite