mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously these tests would run automatically when Angular DevTools lived in another repo. These files have continued to live here but have not been running automatically on each PR. Now, these test files have been revived to run properly with our changes since the repo merge. This is a first step to reviving our e2e testing. Next steps include writing cypress tests for new features like Injector Graph, Router tree, signals visualizations, etc. PR Close #61972
213 lines
8.7 KiB
YAML
213 lines
8.7 KiB
YAML
name: Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile
|
|
- name: Check code lint
|
|
run: yarn -s tslint
|
|
- name: Check for circular dependencies
|
|
run: yarn -s ts-circular-deps:check
|
|
- name: Validate pull approve configuration
|
|
run: yarn -s ng-dev pullapprove verify
|
|
- name: Validate angular robot configuration
|
|
run: yarn -s ng-dev ngbot verify
|
|
- name: Confirm code builds with typescript as expected
|
|
run: yarn -s check-tooling-setup
|
|
- name: Check commit message
|
|
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
|
|
- name: Check code format
|
|
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
|
|
- name: Check Package Licenses
|
|
uses: angular/dev-infra/github-actions/linting/licenses@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
allow-dependencies-licenses: 'pkg:npm/google-protobuf@'
|
|
|
|
devtools:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel RBE
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile
|
|
- name: Run unit tests
|
|
run: yarn devtools:test
|
|
- name: Test build
|
|
run: yarn devtools:build:chrome
|
|
- name: Install Cypress
|
|
run: yarn global add cypress@14.4.1
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@6c143abc292aa835d827652c2ea025d098311070 # v6.10.1
|
|
with:
|
|
command: cypress run --project ./devtools/cypress
|
|
start: yarn bazel run //devtools/src:devserver
|
|
wait-on: 'http://localhost:4200'
|
|
wait-on-timeout: 300
|
|
|
|
test:
|
|
runs-on: ubuntu-latest-8core
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel Remote Caching
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile --network-timeout 100000
|
|
- name: Run CI tests for framework
|
|
run: yarn test:ci
|
|
env:
|
|
# Ensures Aspect lock files are up-to-date.
|
|
# TODO(devversion): Remove when removing yarn.
|
|
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
|
|
- name: Upload GRPC logs (for debugging of RBE issues)
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
path: /tmp/rbe-grpc.log
|
|
retention-days: 1
|
|
|
|
integration-tests:
|
|
runs-on: ubuntu-latest-4core
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel Remote Caching
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile --network-timeout 100000
|
|
- name: Run integration CI tests for framework
|
|
run: yarn integration-tests:ci
|
|
|
|
artifacts:
|
|
needs: [test]
|
|
if: needs.test.result == 'success'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel Remote Caching
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile --network-timeout 100000
|
|
- name: Build artifacts
|
|
run: yarn tsx ./scripts/build/build-packages-dist.mts
|
|
- name: Archive build artifacts
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: pr-artifacts-${{ github.event.number }}
|
|
path: dist/packages-dist/
|
|
|
|
adev:
|
|
runs-on:
|
|
labels: ubuntu-latest-8core
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel RBE
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile
|
|
- name: Run tests
|
|
run: yarn bazel test //adev/...
|
|
- name: Build adev in fast mode to ensure it continues to work
|
|
run: yarn bazel build //adev:build --config=release
|
|
|
|
zone-js:
|
|
runs-on:
|
|
labels: ubuntu-latest-4core
|
|
steps:
|
|
- name: Initialize environment
|
|
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
with:
|
|
cache-node-modules: true
|
|
node-module-directories: |
|
|
./node_modules
|
|
./packages/zone.js/node_modules
|
|
./packages/zone.js/test/typings/node_modules
|
|
- name: Setup Bazel
|
|
uses: angular/dev-infra/github-actions/bazel/setup@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Setup Bazel RBE
|
|
uses: angular/dev-infra/github-actions/bazel/configure-remote@db18d7175d759fdfb3e40d363a1579621d1fcffd
|
|
- name: Install node modules
|
|
run: yarn install --frozen-lockfile
|
|
- run: |
|
|
yarn bazel build \
|
|
//packages/zone.js/bundles:zone.umd.js \
|
|
//packages/zone.js:npm_package \
|
|
//packages/zone.js/test/closure:closure_js \
|
|
|
|
- run: |
|
|
rm -Rf packages/zone.js/build
|
|
rm -Rf packages/zone.js/test/extra/*.umd.js
|
|
|
|
mkdir -p packages/zone.js/build/
|
|
mkdir -p packages/zone.js/build/test/
|
|
|
|
cp dist/bin/packages/zone.js/bundles/zone.umd.js packages/zone.js/build/zone.umd.js
|
|
cp dist/bin/packages/zone.js/npm_package/bundles/zone-mix.umd.js ./packages/zone.js/test/extra/
|
|
cp dist/bin/packages/zone.js/npm_package/bundles/zone-patch-electron.umd.js ./packages/zone.js/test/extra/
|
|
cp dist/bin/packages/zone.js/test/closure/zone.closure.mjs ./packages/zone.js/build/test/zone.closure.mjs
|
|
|
|
# Install
|
|
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
|
# Run zone.js tools tests
|
|
- run: yarn --cwd packages/zone.js promisefinallytest
|
|
- run: yarn --cwd packages/zone.js jest:test
|
|
- run: yarn --cwd packages/zone.js jest:nodetest
|
|
- run: yarn --cwd packages/zone.js vitest:test
|
|
- run: yarn --cwd packages/zone.js electrontest
|
|
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
|
|
- run: yarn --cwd packages/zone.js/test/typings test
|
|
|
|
# saucelabs:
|
|
# runs-on: ubuntu-latest-4core
|
|
# env:
|
|
# SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
|
|
# steps:
|
|
# - name: Initialize environment
|
|
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b5a3609f89c06eb4037dce22a93641213a5d1508
|
|
# with:
|
|
# cache-node-modules: true
|
|
# - name: Install node modules
|
|
# run: yarn install --frozen-lockfile
|
|
# - uses: ./.github/actions/saucelabs-legacy
|