|
7 | 7 | branches: [staging] |
8 | 8 | workflow_dispatch: |
9 | 9 |
|
10 | | -permissions: |
11 | | - contents: read |
12 | | - |
13 | | -env: |
14 | | - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} |
15 | | - TURBO_TEAM: ${{ vars.TURBO_TEAM }} |
16 | | - REPO_FOUNDRY_PROFILE: ${{ vars.REPO_FOUNDRY_PROFILE }} |
17 | | - REPO_FOUNDRY_LANGUAGES: ${{ vars.REPO_FOUNDRY_LANGUAGES }} |
18 | | - REPO_FOUNDRY_FEATURES: ${{ vars.REPO_FOUNDRY_FEATURES }} |
19 | | - REPO_FOUNDRY_PACKAGE_MANAGER: ${{ vars.REPO_FOUNDRY_PACKAGE_MANAGER }} |
20 | | - REPO_FOUNDRY_RUNNER: ${{ vars.REPO_FOUNDRY_RUNNER }} |
21 | | - REPO_FOUNDRY_CACHE_PACKAGES: ${{ vars.REPO_FOUNDRY_CACHE_PACKAGES || 'auto' }} |
22 | | - REPO_FOUNDRY_CACHE_BUILD: ${{ vars.REPO_FOUNDRY_CACHE_BUILD || 'auto' }} |
23 | | - REPO_FOUNDRY_BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before || '' }} |
24 | | - |
25 | | -concurrency: |
26 | | - group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.event.pull_request.head.ref || github.ref_name }} |
27 | | - cancel-in-progress: true |
28 | | - |
29 | 10 | jobs: |
30 | | - format: |
31 | | - name: Format |
32 | | - runs-on: ${{ vars.REPO_FOUNDRY_RUNNER || vars.REPO_FOUNDRY_FAST_RUNNER || 'ubuntu-latest' }} |
33 | | - timeout-minutes: 15 |
34 | | - steps: |
35 | | - - name: Checkout |
36 | | - uses: actions/checkout@v7 |
37 | | - with: |
38 | | - fetch-depth: 2 |
39 | | - - name: Detect |
40 | | - id: applicability |
41 | | - run: bash .github/scripts/ci.sh should_run format >> "$GITHUB_OUTPUT" |
42 | | - - name: Format Probe |
43 | | - id: format-probe |
44 | | - if: steps.applicability.outputs.applicable == 'true' |
45 | | - run: bash .github/scripts/format-fast-path.sh |
46 | | - - name: Setup |
47 | | - if: steps.applicability.outputs.applicable == 'true' |
48 | | - uses: ./.github/actions/setup |
49 | | - with: |
50 | | - install: ${{ steps.format-probe.outputs.hit != 'true' }} |
51 | | - install-python: false |
52 | | - install-rust: false |
53 | | - cache-build: false |
54 | | - # Warm the format cache on branch pushes without adding archive |
55 | | - # time to pull-request checks. |
56 | | - cache-save: ${{ github.event_name == 'push' }} |
57 | | - cache-format: true |
58 | | - task: format |
59 | | - - name: Format |
60 | | - if: steps.applicability.outputs.applicable == 'true' |
61 | | - id: format-fast |
62 | | - continue-on-error: ${{ steps.format-probe.outputs.hit == 'true' }} |
63 | | - run: bash .github/scripts/ci.sh format |
64 | | - - name: Setup Fallback |
65 | | - if: >- |
66 | | - steps.applicability.outputs.applicable == 'true' && |
67 | | - steps.format-probe.outputs.hit == 'true' && |
68 | | - steps.format-fast.outcome == 'failure' |
69 | | - uses: ./.github/actions/setup |
70 | | - with: |
71 | | - install: true |
72 | | - install-python: false |
73 | | - install-rust: false |
74 | | - cache-build: false |
75 | | - cache-save: false |
76 | | - cache-format: true |
77 | | - task: format |
78 | | - - name: Format Fallback |
79 | | - if: >- |
80 | | - steps.applicability.outputs.applicable == 'true' && |
81 | | - steps.format-probe.outputs.hit == 'true' && |
82 | | - steps.format-fast.outcome == 'failure' |
83 | | - run: bash .github/scripts/ci.sh format |
84 | | - |
85 | | - lint: |
86 | | - name: Lint |
87 | | - runs-on: ${{ vars.REPO_FOUNDRY_RUNNER || vars.REPO_FOUNDRY_FAST_RUNNER || 'ubuntu-latest' }} |
88 | | - timeout-minutes: 20 |
89 | | - steps: |
90 | | - - name: Checkout |
91 | | - uses: actions/checkout@v7 |
92 | | - with: |
93 | | - fetch-depth: 2 |
94 | | - - name: Detect |
95 | | - id: applicability |
96 | | - run: bash .github/scripts/ci.sh should_run lint >> "$GITHUB_OUTPUT" |
97 | | - - name: Turbo Probe |
98 | | - id: turbo |
99 | | - if: steps.applicability.outputs.applicable == 'true' |
100 | | - run: bash .github/scripts/turbo-cache-probe.sh lint |
101 | | - - name: Setup |
102 | | - if: steps.applicability.outputs.applicable == 'true' |
103 | | - uses: ./.github/actions/setup |
104 | | - with: |
105 | | - install: ${{ steps.turbo.outputs.hit != 'true' }} |
106 | | - install-python: false |
107 | | - cache-build: false |
108 | | - # Warm the lint cache on branch pushes without adding archive time |
109 | | - # to pull-request checks. |
110 | | - cache-save: ${{ github.event_name == 'push' }} |
111 | | - cache-lint: true |
112 | | - task: lint |
113 | | - - name: Lint |
114 | | - if: steps.applicability.outputs.applicable == 'true' |
115 | | - run: bash .github/scripts/ci.sh lint |
116 | | - |
117 | | - type-check: |
118 | | - name: Type-Check |
119 | | - runs-on: ubuntu-latest |
120 | | - timeout-minutes: 20 |
121 | | - steps: |
122 | | - - name: Checkout |
123 | | - uses: actions/checkout@v7 |
124 | | - with: |
125 | | - fetch-depth: 2 |
126 | | - - name: Detect |
127 | | - id: applicability |
128 | | - run: bash .github/scripts/ci.sh should_run type_check >> "$GITHUB_OUTPUT" |
129 | | - - name: Turbo Probe |
130 | | - id: turbo |
131 | | - if: steps.applicability.outputs.applicable == 'true' |
132 | | - run: bash .github/scripts/turbo-cache-probe.sh type-check |
133 | | - - name: Setup |
134 | | - if: steps.applicability.outputs.applicable == 'true' |
135 | | - uses: ./.github/actions/setup |
136 | | - with: |
137 | | - install: ${{ steps.turbo.outputs.hit != 'true' }} |
138 | | - install-python: false |
139 | | - cache-build: ${{ steps.applicability.outputs.rust == 'true' || vars.REPO_FOUNDRY_CACHE_BUILD == 'true' }} |
140 | | - cache-save: ${{ github.event_name == 'push' }} |
141 | | - task: type_check |
142 | | - - name: Type-Check |
143 | | - if: steps.applicability.outputs.applicable == 'true' |
144 | | - run: bash .github/scripts/ci.sh type_check |
145 | | - |
146 | | - build: |
147 | | - name: Build |
148 | | - runs-on: ubuntu-latest |
149 | | - timeout-minutes: 30 |
150 | | - steps: |
151 | | - - name: Checkout |
152 | | - uses: actions/checkout@v7 |
153 | | - with: |
154 | | - fetch-depth: 2 |
155 | | - - name: Detect |
156 | | - id: applicability |
157 | | - run: bash .github/scripts/ci.sh should_run build >> "$GITHUB_OUTPUT" |
158 | | - - name: Turbo Probe |
159 | | - id: turbo |
160 | | - if: steps.applicability.outputs.applicable == 'true' |
161 | | - run: bash .github/scripts/turbo-cache-probe.sh build |
162 | | - - name: Setup |
163 | | - if: steps.applicability.outputs.applicable == 'true' |
164 | | - uses: ./.github/actions/setup |
165 | | - with: |
166 | | - install: ${{ steps.turbo.outputs.hit != 'true' }} |
167 | | - install-python: false |
168 | | - cache-build: ${{ steps.applicability.outputs.rust == 'true' || vars.REPO_FOUNDRY_CACHE_BUILD == 'true' }} |
169 | | - cache-save: ${{ github.event_name == 'push' }} |
170 | | - task: build |
171 | | - - name: Build |
172 | | - if: steps.applicability.outputs.applicable == 'true' |
173 | | - run: bash .github/scripts/ci.sh build |
| 11 | + ci: |
| 12 | + name: Tasks |
| 13 | + uses: 0xPlayerOne/code-foundry/.github/workflows/reusable-ci.yml@v0.6.0 |
| 14 | + secrets: inherit |
0 commit comments