Use master of js-sdk when running CI on master
We previously checked out develop js-sdk even when building / testing mster. This would have worked usually, except when we have non-backwards compat changes on the js-sdk which we sometimes do with unstable interfaces (like sliding sync). This changes to use the master branch.
This commit is contained in:
4
.github/workflows/end-to-end-tests.yaml
vendored
4
.github/workflows/end-to-end-tests.yaml
vendored
@@ -37,6 +37,8 @@ env:
|
|||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
# Use 6 runners in the default case, but 4 when running on a schedule where we run all 5 projects (20 runners total)
|
# Use 6 runners in the default case, but 4 when running on a schedule where we run all 5 projects (20 runners total)
|
||||||
NUM_RUNNERS: ${{ github.event_name == 'schedule' && 4 || 6 }}
|
NUM_RUNNERS: ${{ github.event_name == 'schedule' && 4 || 6 }}
|
||||||
|
# If run on the master branch, we need to fetch matching branches
|
||||||
|
DEFAULT_BRANCH: ${{ github.ref == 'refs/heads/master' && 'master' || '' }}
|
||||||
|
|
||||||
permissions: {} # No permissions required
|
permissions: {} # No permissions required
|
||||||
|
|
||||||
@@ -65,7 +67,7 @@ jobs:
|
|||||||
# tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one
|
# tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one
|
||||||
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}
|
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}
|
||||||
run: |
|
run: |
|
||||||
scripts/layered.sh
|
scripts/layered.sh "$DEFAULT_BRANCH"
|
||||||
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
|
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
|
||||||
VECTOR_SHA=$(git rev-parse --short=12 HEAD)
|
VECTOR_SHA=$(git rev-parse --short=12 HEAD)
|
||||||
echo "VERSION=$VECTOR_SHA--js-$JSSDK_SHA" >> $GITHUB_OUTPUT
|
echo "VERSION=$VECTOR_SHA--js-$JSSDK_SHA" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
5
.github/workflows/static_analysis.yaml
vendored
5
.github/workflows/static_analysis.yaml
vendored
@@ -15,6 +15,8 @@ env:
|
|||||||
# These must be set for fetchdep.sh to get the right branch
|
# These must be set for fetchdep.sh to get the right branch
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
# If run on the master branch, we need to fetch matching branches
|
||||||
|
DEFAULT_BRANCH: ${{ github.ref == 'refs/heads/master' && 'master' || '' }}
|
||||||
|
|
||||||
permissions: {} # No permissions required
|
permissions: {} # No permissions required
|
||||||
|
|
||||||
@@ -31,7 +33,8 @@ jobs:
|
|||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: "./scripts/layered.sh"
|
run: |
|
||||||
|
./scripts/layered.sh "$DEFAULT_BRANCH"
|
||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: "yarn run lint:types"
|
run: "yarn run lint:types"
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
DEFAULT_BRANCH=${1:-develop}
|
||||||
|
|
||||||
# Creates a layered environment with the full repo for the app and SDKs cloned
|
# Creates a layered environment with the full repo for the app and SDKs cloned
|
||||||
# and linked. This gives an element-web dev environment ready to build with
|
# and linked. This gives an element-web dev environment ready to build with
|
||||||
# matching branches of react-sdk's dependencies so that changes can be tested
|
# matching branches of react-sdk's dependencies so that changes can be tested
|
||||||
@@ -21,7 +23,7 @@ export PR_ORG=element-hq
|
|||||||
export PR_REPO=element-web
|
export PR_REPO=element-web
|
||||||
|
|
||||||
# Set up the js-sdk first
|
# Set up the js-sdk first
|
||||||
scripts/fetchdep.sh matrix-org matrix-js-sdk develop
|
scripts/fetchdep.sh matrix-org matrix-js-sdk $DEFAULT_BRANCH
|
||||||
pushd matrix-js-sdk
|
pushd matrix-js-sdk
|
||||||
[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
|
[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF
|
||||||
yarn link
|
yarn link
|
||||||
|
|||||||
Reference in New Issue
Block a user