|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize, reopened] |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +permissions: {} |
| 12 | + |
| 13 | +defaults: |
| 14 | + run: |
| 15 | + shell: bash |
| 16 | + |
| 17 | +jobs: |
| 18 | + lint: |
| 19 | + timeout-minutes: 10 |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + # Because the checkout and setup node action is contained in the dev-infra repo, we must |
| 23 | + # checkout the repo to be able to run the action we have created. Other repos will skip |
| 24 | + # this step. |
| 25 | + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 |
| 26 | + - uses: ./github-actions/npm/checkout-and-setup-node |
| 27 | + - uses: ./github-actions/bazel/setup |
| 28 | + - uses: ./github-actions/bazel/configure-remote |
| 29 | + - run: yarn install --immutable |
| 30 | + - name: Check code format |
| 31 | + run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }} |
| 32 | + - name: Check commit message |
| 33 | + run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} |
| 34 | + - name: Check code lint |
| 35 | + run: yarn lint |
| 36 | + - name: Confirm code builds with typescript as expected |
| 37 | + run: yarn tsc -p tsconfig.json |
| 38 | + |
| 39 | + test: |
| 40 | + timeout-minutes: 15 |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + # Because the checkout and setup node action is contained in the dev-infra repo, we must |
| 44 | + # checkout the repo to be able to run the action we have created. Other repos will skip |
| 45 | + # this step. |
| 46 | + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 |
| 47 | + - uses: ./github-actions/npm/checkout-and-setup-node |
| 48 | + - uses: ./github-actions/bazel/setup |
| 49 | + - uses: ./github-actions/bazel/configure-remote |
| 50 | + - run: yarn install --immutable |
| 51 | + - run: yarn bazel test -- //... |
| 52 | + |
| 53 | + test-win: |
| 54 | + timeout-minutes: 30 |
| 55 | + runs-on: windows-latest |
| 56 | + steps: |
| 57 | + # Because the checkout and setup node action is contained in the dev-infra repo, we must |
| 58 | + # checkout the repo to be able to run the action we have created. Other repos will skip |
| 59 | + # this step. |
| 60 | + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 |
| 61 | + - uses: ./github-actions/npm/checkout-and-setup-node |
| 62 | + - uses: ./github-actions/bazel/setup |
| 63 | + - uses: ./github-actions/bazel/configure-remote |
| 64 | + - run: yarn install --immutable |
| 65 | + - run: yarn bazel test --test_tag_filters=windows --build_tests_only -- ... -bazel/remote-execution/... |
| 66 | + |
| 67 | + test-macos: |
| 68 | + timeout-minutes: 30 |
| 69 | + runs-on: macos-latest |
| 70 | + steps: |
| 71 | + # Because the checkout and setup node action is contained in the dev-infra repo, we must |
| 72 | + # checkout the repo to be able to run the action we have created. Other repos will skip |
| 73 | + # this step. |
| 74 | + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 |
| 75 | + - uses: ./github-actions/npm/checkout-and-setup-node |
| 76 | + - uses: ./github-actions/bazel/setup |
| 77 | + - uses: ./github-actions/bazel/configure-remote |
| 78 | + - run: yarn install --immutable |
| 79 | + - run: yarn bazel test --test_tag_filters=macos --build_tests_only -- //... -//bazel/remote-execution/... |
0 commit comments