Skip to content

Commit

Permalink
ci: migrate to using GHA
Browse files Browse the repository at this point in the history
Migrate CI to GHA form CircleCI
  • Loading branch information
josephperrott committed Jul 31, 2023
1 parent 0dcb01f commit 09915c3
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn bazel test //...

0 comments on commit 09915c3

Please sign in to comment.