Skip to content

Commit e506695

Browse files
authored
Merge two stages into one job (#2006)
1 parent 974b25c commit e506695

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

.travis.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,17 @@ cache:
2424

2525
jobs:
2626
include:
27-
- stage: precommit
28-
name: "Pre-commit Check"
27+
- stage: test
28+
name: "Pre-commit and Tests"
2929
script:
3030
- set -e
31-
- docker build --target dev -t elasticdl:dev -f
32-
elasticdl/docker/Dockerfile .
31+
# Build Docker images.
32+
- bash elasticdl/docker/build_all.sh
33+
# Run pre-commit checks.
3334
- docker run --rm -it -v $PWD:/work -w /work
3435
elasticdl:dev /work/scripts/pre-commit.sh
35-
- stage: tests
36-
name: "Tests"
37-
script:
38-
- set -e
3936
# Set up Kubernetes environment
4037
- bash scripts/setup_k8s_env.sh
41-
- bash elasticdl/docker/build_all.sh
4238
# Create shared folder to store coverage report
4339
- mkdir shared
4440
# Run unit tests not related to ODPS
@@ -54,7 +50,7 @@ jobs:
5450
# Run unit tests related to ODPS (skipped for pull requests from forks)
5551
- |
5652
if [ "$ODPS_ACCESS_ID" == "" ] || [ "$ODPS_ACCESS_KEY" == "" ]; then
57-
echo "Skipping ODPS related unit tests since either ODPS_ACCESS_ID " \
53+
echo "Skip ODPS related unit tests since either ODPS_ACCESS_ID " \
5854
"or ODPS_ACCESS_KEY is not set"
5955
else
6056
docker run --rm -it \

0 commit comments

Comments
 (0)