Skip to content

Commit 12dbe1a

Browse files
ci: migrate aio jobs to GHA (angular#51071)
Migrate aio presubmit and deploy jobs to use Github Actions PR Close angular#51071
1 parent 8693627 commit 12dbe1a

3 files changed

Lines changed: 65 additions & 53 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -313,48 +313,6 @@ jobs:
313313
- notify_webhook_on_fail:
314314
webhook_url_env_var: SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL
315315

316-
test_aio:
317-
executor:
318-
name: test-browser-executor
319-
resource_class: 2xlarge+
320-
steps:
321-
- custom_attach_workspace
322-
- init_environment
323-
324-
# Run all aio tests
325-
- run:
326-
command: yarn --cwd aio test:ci
327-
no_output_timeout: 20m
328-
329-
# Check the bundle sizes.
330-
- run: yarn --cwd aio payload-size
331-
332-
deploy_aio:
333-
executor:
334-
name: test-browser-executor
335-
resource_class: 2xlarge+
336-
steps:
337-
- custom_attach_workspace
338-
- init_environment
339-
# Deploy angular.io to production (if necessary)
340-
- run: setPublicVar_CI_STABLE_BRANCH
341-
- run: yarn --cwd aio deploy-production
342-
343-
test_aio_local:
344-
executor:
345-
name: test-browser-executor
346-
resource_class: 2xlarge+
347-
steps:
348-
- custom_attach_workspace
349-
- init_environment
350-
# Run all aio tests (with local Angular packages)
351-
- run:
352-
command: yarn --cwd aio test-local:ci
353-
no_output_timeout: 20m
354-
355-
# Check the bundle sizes.
356-
- run: yarn --cwd aio payload-size aio-local
357-
358316
# The `build-npm-packages` tasks exist for backwards-compatibility with old scripts and
359317
# tests that rely on the pre-Bazel `dist/packages-dist` output structure (build.sh).
360318
# Having multiple jobs that independently build in this manner duplicates some work; we build
@@ -594,15 +552,6 @@ workflows:
594552
- legacy-unit-tests-saucelabs:
595553
requires:
596554
- setup
597-
- test_aio:
598-
requires:
599-
- setup
600-
- deploy_aio:
601-
requires:
602-
- test_aio
603-
- test_aio_local:
604-
requires:
605-
- setup
606555
- publish_packages_as_artifacts:
607556
requires:
608557
- build-npm-packages
@@ -611,8 +560,6 @@ workflows:
611560
requires:
612561
# Only publish if tests and integration tests pass
613562
- test
614-
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
615-
- test_aio_local
616563
# Get the artifacts to publish from the build-packages-dist job
617564
# since the publishing script expects the legacy outputs layout.
618565
- build-npm-packages

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,67 @@ jobs:
105105
run: yarn install --frozen-lockfile --network-timeout 100000
106106
- name: Run CI tests for framework
107107
run: yarn test:ci
108+
109+
aio:
110+
runs-on: ubuntu-latest-4core
111+
steps:
112+
- name: Initialize environment
113+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
114+
with:
115+
cache-node-modules: true
116+
node-module-directories: |
117+
./aio/node_modules
118+
- name: Setup Bazel
119+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
120+
- name: Setup Bazel RBE
121+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
122+
- name: Install node modules for aio
123+
run: yarn install --cwd aio --frozen-lockfile
124+
- name: Run AIO tests with upstream packages
125+
run: yarn --cwd aio test:ci
126+
- name: Check generated bundle sizes
127+
run: yarn --cwd aio payload-size
128+
129+
aio-local:
130+
runs-on:
131+
labels: ubuntu-latest-4core
132+
steps:
133+
- name: Initialize environment
134+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
135+
with:
136+
cache-node-modules: true
137+
node-module-directories: |
138+
./aio/node_modules
139+
- name: Setup Bazel
140+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
141+
- name: Setup Bazel RBE
142+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
143+
- name: Install node modules
144+
run: yarn install --cwd aio --frozen-lockfile
145+
- name: Run AIO tests with local packages
146+
run: yarn --cwd aio test-local:ci
147+
- name: Check generated bundle sizes
148+
run: yarn --cwd aio payload-size aio-local
149+
150+
aio-deploy:
151+
needs: [aio]
152+
if: needs.aio.result == success() && github.event_name == 'push'
153+
runs-on:
154+
labels: ubuntu-latest
155+
steps:
156+
- name: Initialize environment
157+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@45de46d9ba0e0689b7a846fd31ec9e241807ca71
158+
with:
159+
cache-node-modules: true
160+
node-module-directories: |
161+
./aio/node_modules
162+
- name: Setup Bazel
163+
uses: angular/dev-infra/github-actions/bazel/setup@45de46d9ba0e0689b7a846fd31ec9e241807ca71
164+
- name: Setup Bazel RBE
165+
uses: angular/dev-infra/github-actions/bazel/configure-remote@45de46d9ba0e0689b7a846fd31ec9e241807ca71
166+
- name: Install node modules for aio
167+
run: yarn install --cwd aio --frozen-lockfile
168+
- name: Set the stable branch environment variable
169+
run: export CI_STABLE_BRANCH=$(npm info @angular/core dist-tags.latest | sed -r 's/^\\s*([0-9]+\\.[0-9]+)\\.[0-9]+.*$/\\1.x/')
170+
- name: Deploy aio to production
171+
run: yarn --cwd aio deploy-production

aio/scripts/payload.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -eu -o pipefail
55
readonly thisDir=$(cd $(dirname $0); pwd)
66
readonly parentDir=$(dirname $thisDir)
77
readonly target=${1:-aio}
8+
readonly PROJECT_ROOT=$(realpath "$(dirname ${thisDir})/..")
89

910
# Track payload size functions
1011
source ../scripts/ci/payload-size.sh

0 commit comments

Comments
 (0)