From 91edfb8be0eb70b43eed5938738b8b44b551a94f Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 10 Oct 2018 23:55:45 +0300 Subject: [PATCH] ci(docs-infra): add jobs to CircleCI config (#26377) PR Close #26377 --- .circleci/config.yml | 114 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01e5852ef9..6a1fe6e7cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -161,6 +161,107 @@ jobs: - *setup_bazel_remote_execution - run: bazel query --output=label //... | xargs bazel test --define=compile=local --build_tag_filters=ivy-local --test_tag_filters=-manual,ivy-local + test_aio: + <<: *job_defaults + steps: + - *define_env_vars + - checkout: + <<: *post_checkout + - restore_cache: + key: *cache_key + # Build aio + - run: yarn --cwd aio build --progress=false + # Lint the code + - run: yarn --cwd aio lint + # Run PWA-score tests + # (Run before unit and e2e tests, which destroy the `dist/` directory.) + - run: + name: Run PWA-score tests + command: xvfb-run --auto-servernum yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE + # Check the bundle sizes. + # (Run before unit and e2e tests, which destroy the `dist/` directory.) + # TODO(gkalpak): Fix this. + # - run: yarn --cwd aio payload-size + # Run unit tests + - run: xvfb-run --auto-servernum yarn --cwd aio test --watch=false + # Run e2e tests + - run: xvfb-run --auto-servernum yarn --cwd aio e2e + # Run unit tests for Firebase redirects + - run: yarn --cwd aio redirects-test + + test_aio_local: + <<: *job_defaults + steps: + - *define_env_vars + - checkout: + <<: *post_checkout + - attach_workspace: + at: dist + - restore_cache: + key: *cache_key + # Build aio (with local Angular packages) + - run: yarn --cwd aio build-local --progress=false + # Run PWA-score tests + # (Run before unit and e2e tests, which destroy the `dist/` directory.) + - run: + name: Run PWA-score tests + command: xvfb-run --auto-servernum yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE + # Run unit tests + - run: xvfb-run --auto-servernum yarn --cwd aio test --watch=false + # Run e2e tests + - run: xvfb-run --auto-servernum yarn --cwd aio e2e + + test_aio_tools: + <<: *job_defaults + steps: + - *define_env_vars + - checkout: + <<: *post_checkout + - attach_workspace: + at: dist + - restore_cache: + key: *cache_key + # Install + - run: yarn --cwd aio install --frozen-lockfile --non-interactive + - run: yarn --cwd aio extract-cli-command-docs + # Run tools tests + - run: yarn --cwd aio tools-test + - run: ./aio/aio-builds-setup/scripts/test.sh + + test_docs_examples_0: + <<: *job_defaults + steps: + - *define_env_vars + - checkout: + <<: *post_checkout + - attach_workspace: + at: dist + - restore_cache: + key: *cache_key + # Install root + - run: yarn install --frozen-lockfile --non-interactive + # Install aio + - run: yarn --cwd aio install --frozen-lockfile --non-interactive + # Run examples tests + - run: xvfb-run --auto-servernum yarn --cwd aio example-e2e --setup --local --shard=0/2 + + test_docs_examples_1: + <<: *job_defaults + steps: + - *define_env_vars + - checkout: + <<: *post_checkout + - attach_workspace: + at: dist + - restore_cache: + key: *cache_key + # Install root + - run: yarn install --frozen-lockfile --non-interactive + # Install aio + - run: yarn --cwd aio install --frozen-lockfile --non-interactive + # Run examples tests + - run: xvfb-run --auto-servernum yarn --cwd aio example-e2e --setup --local --shard=1/2 + # This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`. aio_preview: <<: *job_defaults @@ -292,6 +393,19 @@ workflows: - test_ivy_jit - test_ivy_aot - build-packages-dist + - test_aio + - test_aio_local: + requires: + - build-packages-dist + - test_aio_tools: + requires: + - build-packages-dist + - test_docs_examples_0: + requires: + - build-packages-dist + - test_docs_examples_1: + requires: + - build-packages-dist - aio_preview: # Only run on PR builds. (There can be no previews for non-PR builds.) filters: