microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6357dc0d0e1fb00a591a2a8aaf243804d727e52b

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

63lines · modecode

1name: CI
2
3on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10 - release/*
11 merge_group:
12
13permissions:
14 contents: read
15
16concurrency:
17 group: ${{ github.workflow }}-${{ github.ref }}
18 cancel-in-progress: true
19
20jobs:
21 changes:
22 name: Detect Changes
23 runs-on: ubuntu-slim
24 outputs:
25 core: ${{ steps.filter.outputs.core }}
26 steps:
27 - uses: actions/checkout@v6
28 # cspell:ignore dorny
29 - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
30 id: filter
31 with:
32 predicate-quantifier: "every"
33 filters: |
34 core:
35 - '**'
36 - '!.prettierignore'
37 - '!.prettierrc.json'
38 - '!cspell.yaml'
39 - '!eslint.config.json'
40 - '!.chronus/**'
41 - '!eng/emitters/**'
42 - '!packages/http-client-csharp/**'
43 - '!packages/http-client-java/**'
44 - '!packages/http-client-python/**'
45
46 core:
47 needs: changes
48 if: needs.changes.outputs.core == 'true'
49 uses: ./.github/workflows/core-ci.yml
50
51 ci-gate:
52 name: CI Gate
53 runs-on: ubuntu-slim
54 if: "!cancelled() || needs.core.result == 'cancelled'"
55 needs: [core]
56 steps:
57 - name: Validate CI results
58 run: |
59 if [[ "${{ needs.core.result }}" == "failure" || "${{ needs.core.result }}" == "cancelled" ]]; then
60 echo "Core CI failed or was cancelled"
61 exit 1
62 fi
63 echo "All CI checks passed or were appropriately skipped"
64