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

ci: migrate to using GHA #3211

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
8 changes: 2 additions & 6 deletions .circleci/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ build --noshow_progress
# This allows us adding specific configuration flags for builds within CircleCI.
# See more: https://docs.bazel.build/versions/master/user-manual.html#where-are-the-bazelrc-files

# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
build --repository_cache=/home/circleci/bazel_repository_cache

# Retry in the event of flakes, eg. https://circleci.com/gh/angular/universal/1768
test --flaky_test_attempts=2

# More details on failures
build --verbose_failures=true

# Setup disk cache
build --disk_cache=/home/circleci/bazel_disk_cache
test --disk_cache=/home/circleci/bazel_disk_cache
build --disk_cache=/tmp/bazel_disk_cache
test --disk_cache=/tmp/bazel_disk_cache
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
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@0109d498b0f6aae418ed4924a5e5c65695f0ac61
with:
node-version: 18
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Confirm code builds with typescript as expected
run: yarn -s check-tooling-setup
- name: Check code lint
run: yarn lint
- name: Check commit message
# Commit message validation is only done on pull requests as its too late to validate once
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: Check code format
# Code formatting checks are only done on pull requests as its too late to validate once
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}

tests:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@0109d498b0f6aae418ed4924a5e5c65695f0ac61
with:
node-version: 18
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@0109d498b0f6aae418ed4924a5e5c65695f0ac61
# - name: Setup Bazel RBE
# uses: angular/dev-infra/github-actions/bazel/configure-remote@0109d498b0f6aae418ed4924a5e5c65695f0ac61
- run: cat ./.circleci/bazel.rc >> .bazelrc
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn bazel test //...
Loading