File tree Expand file tree Collapse file tree 3 files changed +55
-3
lines changed Expand file tree Collapse file tree 3 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
jobs :
5
5
build-and-test :
6
+ parameters :
7
+ dependency_type :
8
+ # Whether the test should build using the commit dependency versions or the latest builds.
9
+ type : enum
10
+ enum : ["package.json", "builds-repo"]
6
11
docker :
7
12
- image : cimg/node:14.18.1@sha256:50bd08d36e3b6b1bbc5172705f53630d439b959c94e11cdad7f4810f90c5f598
8
13
steps :
20
25
pkg-manager : yarn
21
26
- run : scripts/lint.sh
22
27
- run : scripts/format.sh
23
- - run : scripts/build.sh
28
+ - run : scripts/build.sh << parameters.dependency_type >>
24
29
- run : scripts/test.sh
25
30
workflows :
26
31
build-and-test :
27
32
jobs :
28
- - build-and-test
33
+ - build-and-test :
34
+ name : build-and-test
35
+ dependency_type : " package.json"
36
+ buid-and-test-against-builds :
37
+ jobs :
38
+ - build-and-test :
39
+ name : build-and-test-builds-repo
40
+ dependency_type : " builds-repo"
41
+ triggers :
42
+ - schedule :
43
+ filters :
44
+ branches :
45
+ only :
46
+ - master
47
+ # Runs monitoring jobs at 10:00AM every day.
48
+ cron : ' 0 10 * * *'
49
+
Original file line number Diff line number Diff line change 24
24
- run : yarn install
25
25
- run : yarn install --cwd integration/project
26
26
- run : cd integration/project && yarn ngcc
27
- - run : scripts/build.sh
27
+ - run : scripts/build.sh package.json
28
28
- run : xvfb-run -a yarn run test:e2e
29
29
if : runner.os == 'Linux'
30
30
- run : yarn run test:e2e
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ DEPENDENCY_TYPE=$1
4
+ USE_PACKAGE_JSON=false
5
+ USE_BUILDS_REPO=false
6
+
7
+ if [ " $DEPENDENCY_TYPE " = " package.json" ]; then
8
+ USE_PACKAGE_JSON=true
9
+ echo " Using the dependencies defined in package.json"
10
+ elif [ " $DEPENDENCY_TYPE " = " builds-repo" ]; then
11
+ USE_BUILDS_REPO=true
12
+ echo " Use the latest dependency from builds repo."
13
+ else
14
+ echo " Please provide a valid dependency type as the first argument: 'package.json' or 'builds-repo'"
15
+ echo
16
+ echo " Usage example:"
17
+ echo " $0 package.json"
18
+ exit 1;
19
+ fi
20
+
21
+ if [ " $USE_BUILDS_REPO " = true ]; then
22
+ for dep in " language-service" ; do
23
+ echo $( node -e "
24
+ const pkgJson = require('./package.json');
25
+ pkgJson['dependencies']['@angular/$dep '] = 'https://github.com/angular/$dep -builds.git';
26
+ console.log(JSON.stringify(pkgJson));
27
+ " ) > package.json
28
+ done
29
+ fi
30
+
3
31
set -ex -o pipefail
4
32
5
33
# Enable extended pattern matching features
@@ -9,6 +37,9 @@ shopt -s extglob
9
37
rm -rf dist
10
38
rm -rf ** /* .tsbuildinfo
11
39
40
+
41
+ yarn install;
42
+
12
43
# Build the client and server
13
44
yarn run compile
14
45
You can’t perform that action at this time.
0 commit comments