зеркало из https://github.com/mozilla/bedrock.git
Move to CircleCI 2 for PR testing
This commit is contained in:
Родитель
7e220a7d2f
Коммит
ae51a45221
|
@ -0,0 +1,38 @@
|
|||
version: 2
|
||||
jobs:
|
||||
test_py:
|
||||
machine:
|
||||
image: circleci/classic:201710-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Git Submodule
|
||||
command: |
|
||||
git submodule sync
|
||||
git submodule update --init --recursive
|
||||
- run:
|
||||
name: Python Tests
|
||||
command: |
|
||||
docker/bin/build_images.sh --test
|
||||
docker/bin/run_tests.sh
|
||||
|
||||
test_js:
|
||||
docker:
|
||||
- image: circleci/node:6.11.4-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: JS Tests
|
||||
command: |
|
||||
yarn install --pure-lockfile
|
||||
npm install gulp-cli
|
||||
node_modules/.bin/gulp css:lint
|
||||
node_modules/.bin/gulp js:lint
|
||||
node_modules/.bin/gulp js:test
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
run_tests:
|
||||
jobs:
|
||||
- test_py
|
||||
- test_js
|
28
circle.yml
28
circle.yml
|
@ -1,28 +0,0 @@
|
|||
machine:
|
||||
services:
|
||||
- docker
|
||||
node:
|
||||
version: 6.11.3
|
||||
|
||||
checkout:
|
||||
post:
|
||||
- git submodule sync
|
||||
- git submodule update --init --recursive
|
||||
|
||||
dependencies:
|
||||
cache_directories:
|
||||
- node_modules
|
||||
- "~/docker"
|
||||
override:
|
||||
- docker/bin/build_images.sh --test
|
||||
- npm install -g gulp-cli
|
||||
- yarn install --pure-lockfile
|
||||
|
||||
test:
|
||||
pre:
|
||||
- mkdir -p "$CIRCLE_TEST_REPORTS/django"
|
||||
override:
|
||||
- gulp css:lint
|
||||
- gulp js:lint
|
||||
- gulp js:test
|
||||
- docker/bin/run_tests.sh
|
|
@ -40,7 +40,7 @@ DOCKER_IMAGE_TAG="${DOCKER_REPO}/bedrock_${DOCKERFILE}:${DOCKER_TAG}"
|
|||
|
||||
# generate the dockerfile
|
||||
rm -f "$FINAL_DOCKERFILE"
|
||||
cat "docker/dockerfiles/bedrock_$DOCKERFILE" | envsubst '$GIT_COMMIT' > "$FINAL_DOCKERFILE"
|
||||
sed -e "s/\${GIT_COMMIT}/${GIT_COMMIT}/g" "docker/dockerfiles/bedrock_$DOCKERFILE" > "$FINAL_DOCKERFILE"
|
||||
|
||||
# build the docker image
|
||||
docker build -t "$DOCKER_IMAGE_TAG" --pull="$DOCKER_PULL" --no-cache="$DOCKER_NO_CACHE" -f "$FINAL_DOCKERFILE" "$DOCKER_CTX"
|
||||
|
|
Загрузка…
Ссылка в новой задаче