Fix layering of the riot-web tests pipeline

This commit is contained in:
Travis Ralston 2020-01-20 16:12:59 -07:00
parent 4e018905fc
commit 62b1dd77a6
4 changed files with 37 additions and 10 deletions

View file

@ -86,16 +86,13 @@ steps:
# TODO: Remove hacky chmod for BuildKite
- "chmod +x ./scripts/ci/*.sh"
- "chmod +x ./scripts/*"
- "echo '--- Installing Dependencies'"
- "./scripts/ci/install-deps.sh"
- "echo '--- Running initial build steps'"
- "yarn build"
- "echo '+++ Running Tests'"
- "./scripts/ci/riot-unit-tests.sh"
plugins:
- docker#v3.0.1:
image: "node:10"
propagate-environment: true
workdir: "/workdir/matrix-react-sdk"
- label: "🌐 i18n"
command:

View file

@ -0,0 +1,33 @@
#!/bin/bash
# Creates an environment similar to one that riot-web would expect for
# development. This means going one directory up (and assuming we're in
# a directory like /workdir/matrix-react-sdk) and putting riot-web and
# the js-sdk there.
cd ../ # Assume we're at something like /workdir/matrix-react-sdk
# Set up the js-sdk first
matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk
pushd matrix-js-sdk
yarn link
yarn install
#yarn build
popd
# Now set up the react-sdk
pushd matrix-react-sdk
yarn link matrix-js-sdk
yarn link
yarn install
#yarn build
popd
# Finally, set up riot-web
matrix-react-sdk/scripts/fetchdep.sh vector-im riot-web
pushd riot-web
yarn link matrix-js-sdk
yarn link matrix-react-sdk
yarn install
yarn build:res
popd

View file

@ -6,9 +6,6 @@
set -ev
RIOT_WEB_DIR=riot-web
scripts/ci/build.sh
pushd "$RIOT_WEB_DIR"
scripts/ci/layered-riot-web.sh
cd ../riot-web
yarn test
popd

View file

@ -17,7 +17,7 @@ clone() {
if [ -n "$branch" ]
then
echo "Trying to use $org/$repo#$branch"
git clone git://github.com/$org/$repo.git $repo --branch "$branch" && exit 0
git clone git://github.com/$org/$repo.git $repo --branch "$branch" --depth=1 && exit 0
fi
}