Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singular workflow for CI #214

Merged
merged 8 commits into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 92 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ commands:
at: ~/player

- restore_cache:
keys:
keys:
- v1-bazel-cache-core-{{ .Branch }}-{{ .Revision }}
- v1-bazel-cache-core-{{ .Branch }}
- v1-bazel-cache-core-main
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- attach_workspace:
at: ~/player

- run:
- run:
name: Homebrew Dependencies
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install bazelisk maven openjdk@8
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
# TODO: the timeout should be added to the test itself
- run: bazel test --test_env=APPLITOOLS_API_KEY=${APPLITOOLS_API_KEY} --test_env=APPLITOOLS_BATCH_ID=${CIRCLE_SHA1} --test_env=APPLITOOLS_PR_NUMBER=${CIRCLE_PULL_REQUEST##*/} --test_timeout=1200 --jobs=1 --verbose_failures --config=ci -- //:PlayerUI-Unit-Unit //:PlayerUI-UI-ViewInspectorTests //:PlayerUI-UI-XCUITests

- run:
- run:
when: always
command: |
RESULTS_DIR=_test_results
Expand Down Expand Up @@ -309,90 +309,145 @@ workflows:
ignore:
- main
- /version-.*/
- /pull\/.*/
tags:
ignore: /.*/
- bazelrc:
filters:
branches:
ignore:
- /pull\/.*/
context:
- Build
requires:
- setup

- applitools_init:
filters:
branches:
ignore:
- /pull\/.*/
context:
- applitools
requires:
- bazelrc

- build:
name: build-trunk
filters:
branches:
ignore:
- /pull\/.*/
requires:
- bazelrc

- build:
name: build-fork
filters:
branches:
only:
- /pull\/.*/
requires:
- setup

- build_ios:
name: build-ios-trunk
filters:
branches:
ignore:
- /pull\/.*/
context:
- applitools
requires:
- applitools_init
- bazelrc

- build_ios:
name: build-ios-fork
filters:
branches:
only:
- /pull\/.*/
requires:
- setup

- maybe_release:
filters:
branches:
ignore:
- /pull\/.*/
Comment on lines +374 to +377
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this still work with the /canary command on a PR?

context:
- Publish
requires:
- build
- build_ios
- build-trunk
- build-ios-trunk

- test:
name: test-trunk
filters:
branches:
ignore:
- /pull\/.*/
requires:
- build
- build-trunk

- android_test:
context:
- applitools
requires:
- applitools_init
- build

- coverage:
- test:
name: test-fork
filters:
branches:
only:
- /pull\/.*/
requires:
- build
- build-fork

- applitools_cleanup:
- android_test:
name: android-test-trunk
filters:
branches:
ignore:
- /pull\/.*/
context:
- applitools
requires:
- android_test
- build_ios
- applitools_init
- build-trunk

build_and_test_pr_fork:
jobs:
- setup:
- android_test:
name: android-test-fork
filters:
branches:
only:
- /pull\/.*/
tags:
ignore: /.*/

- build:
requires:
- setup

- build_ios:
requires:
- setup
- build-fork

- test:
- coverage:
name: coverage-trunk
filters:
branches:
ignore:
- /pull\/.*/
requires:
- build
- build-trunk

- android_test:
- coverage:
name: coverage-fork
filters:
branches:
only:
- /pull\/.*/
requires:
- build
- build-fork

- coverage:
- applitools_cleanup:
filters:
branches:
ignore:
- /pull\/.*/
context:
- applitools
requires:
- build
- android-test-trunk
- build-ios-trunk

build_and_test_main:
when:
Expand Down