|
10 | 10 | permissions: |
11 | 11 | contents: read |
12 | 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_CACHE_PACKAGES: ${{ vars.REPO_FOUNDRY_CACHE_PACKAGES || 'auto' }} |
21 | | - REPO_FOUNDRY_CACHE_BUILD: ${{ vars.REPO_FOUNDRY_CACHE_BUILD || 'auto' }} |
22 | | - REPO_FOUNDRY_BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before || '' }} |
23 | | - |
24 | | -concurrency: |
25 | | - group: ${{ github.workflow }}-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.event.pull_request.head.ref || github.ref_name }} |
26 | | - cancel-in-progress: true |
27 | | - |
28 | 13 | jobs: |
29 | | - unit: |
30 | | - name: Unit |
31 | | - # Keep ordinary suites on the lean image. Set the repository variable |
32 | | - # REPO_FOUNDRY_UNIT_RUNNER=ubuntu-latest for native/system-dependent tests. |
33 | | - runs-on: ${{ vars.REPO_FOUNDRY_UNIT_RUNNER || 'ubuntu-slim' }} |
34 | | - timeout-minutes: 30 |
35 | | - steps: |
36 | | - - name: Checkout |
37 | | - uses: actions/checkout@v7 |
38 | | - with: |
39 | | - fetch-depth: 2 |
40 | | - - name: Detect |
41 | | - id: applicability |
42 | | - run: bash .github/scripts/ci.sh task_profile unit >> "$GITHUB_OUTPUT" |
43 | | - - name: Setup |
44 | | - if: steps.applicability.outputs.applicable == 'true' |
45 | | - uses: ./.github/actions/setup |
46 | | - with: |
47 | | - install: true |
48 | | - install-javascript: ${{ steps.applicability.outputs.javascript == 'true' }} |
49 | | - install-python: ${{ steps.applicability.outputs.python == 'true' }} |
50 | | - install-rust: ${{ steps.applicability.outputs.rust == 'true' }} |
51 | | - cache-build: false |
52 | | - cache-environment: false |
53 | | - cache-packages: ${{ vars.REPO_FOUNDRY_CACHE_PACKAGES || 'auto' }} |
54 | | - task: unit |
55 | | - task-javascript: ${{ steps.applicability.outputs.javascript }} |
56 | | - task-python: ${{ steps.applicability.outputs.python }} |
57 | | - task-rust: ${{ steps.applicability.outputs.rust }} |
58 | | - - name: Unit |
59 | | - if: steps.applicability.outputs.applicable == 'true' |
60 | | - run: bash .github/scripts/ci.sh unit |
61 | | - - name: Upload coverage |
62 | | - if: >- |
63 | | - always() && |
64 | | - steps.applicability.outputs.applicable == 'true' && |
65 | | - hashFiles('coverage/**', 'htmlcov/**', '.coverage*', 'target/llvm-cov/**') != '' |
66 | | - uses: actions/upload-artifact@v7 |
67 | | - with: |
68 | | - name: coverage-unit-${{ github.run_id }} |
69 | | - path: | |
70 | | - coverage/** |
71 | | - htmlcov/** |
72 | | - .coverage* |
73 | | - target/llvm-cov/** |
74 | | - compression-level: 1 |
75 | | - if-no-files-found: ignore |
76 | | - retention-days: 14 |
77 | | - |
78 | | - integration: |
79 | | - name: Integration |
80 | | - runs-on: ubuntu-latest |
81 | | - timeout-minutes: 30 |
82 | | - steps: |
83 | | - - name: Checkout |
84 | | - uses: actions/checkout@v7 |
85 | | - with: |
86 | | - fetch-depth: 2 |
87 | | - - name: Detect |
88 | | - id: applicability |
89 | | - run: bash .github/scripts/ci.sh task_profile integration >> "$GITHUB_OUTPUT" |
90 | | - - name: Setup |
91 | | - if: steps.applicability.outputs.applicable == 'true' |
92 | | - uses: ./.github/actions/setup |
93 | | - with: |
94 | | - install: true |
95 | | - install-javascript: ${{ steps.applicability.outputs.javascript == 'true' }} |
96 | | - install-python: ${{ steps.applicability.outputs.python == 'true' }} |
97 | | - install-rust: ${{ steps.applicability.outputs.rust == 'true' }} |
98 | | - cache-build: ${{ steps.applicability.outputs.rust == 'true' }} |
99 | | - cache-environment: false |
100 | | - cache-save: ${{ github.event_name == 'push' }} |
101 | | - task: integration |
102 | | - task-javascript: ${{ steps.applicability.outputs.javascript }} |
103 | | - task-python: ${{ steps.applicability.outputs.python }} |
104 | | - task-rust: ${{ steps.applicability.outputs.rust }} |
105 | | - - name: Integration |
106 | | - if: steps.applicability.outputs.applicable == 'true' |
107 | | - run: bash .github/scripts/ci.sh integration |
108 | | - |
109 | | - e2e: |
110 | | - name: E2E |
111 | | - runs-on: ubuntu-latest |
112 | | - timeout-minutes: 45 |
113 | | - steps: |
114 | | - - name: Checkout |
115 | | - uses: actions/checkout@v7 |
116 | | - with: |
117 | | - fetch-depth: 2 |
118 | | - - name: Detect |
119 | | - id: applicability |
120 | | - run: bash .github/scripts/ci.sh task_profile e2e >> "$GITHUB_OUTPUT" |
121 | | - - name: Cache browser binaries |
122 | | - if: steps.applicability.outputs.applicable == 'true' && steps.applicability.outputs.browser == 'true' |
123 | | - uses: ./.github/actions/cache |
124 | | - with: |
125 | | - save: ${{ github.event_name == 'push' }} |
126 | | - path: | |
127 | | - ~/.cache/ms-playwright |
128 | | - ~/.cache/Cypress |
129 | | - ~/.cache/puppeteer |
130 | | - key: ${{ runner.os }}-e2e-browsers-${{ hashFiles('**/package.json', '**/bun.lock', '**/bun.lockb', '**/pnpm-lock.yaml', '**/yarn.lock', '**/package-lock.json', '**/playwright.config.*', '**/cypress.config.*') }} |
131 | | - restore-keys: | |
132 | | - ${{ runner.os }}-e2e-browsers- |
133 | | - - name: Setup |
134 | | - if: steps.applicability.outputs.applicable == 'true' |
135 | | - uses: ./.github/actions/setup |
136 | | - with: |
137 | | - install: true |
138 | | - install-javascript: ${{ steps.applicability.outputs.javascript == 'true' }} |
139 | | - install-python: ${{ steps.applicability.outputs.python == 'true' }} |
140 | | - install-rust: ${{ steps.applicability.outputs.rust == 'true' }} |
141 | | - cache-build: false |
142 | | - cache-environment: false |
143 | | - cache-save: ${{ github.event_name == 'push' }} |
144 | | - task: e2e |
145 | | - task-javascript: ${{ steps.applicability.outputs.javascript }} |
146 | | - task-python: ${{ steps.applicability.outputs.python }} |
147 | | - task-rust: ${{ steps.applicability.outputs.rust }} |
148 | | - - name: E2E |
149 | | - if: steps.applicability.outputs.applicable == 'true' |
150 | | - run: bash .github/scripts/ci.sh e2e |
151 | | - |
152 | | - smoke: |
153 | | - name: Smoke |
154 | | - runs-on: ubuntu-latest |
155 | | - timeout-minutes: 15 |
156 | | - steps: |
157 | | - - name: Checkout |
158 | | - uses: actions/checkout@v7 |
159 | | - with: |
160 | | - fetch-depth: 2 |
161 | | - - name: Detect |
162 | | - id: applicability |
163 | | - run: bash .github/scripts/ci.sh task_profile smoke >> "$GITHUB_OUTPUT" |
164 | | - - name: Setup |
165 | | - if: steps.applicability.outputs.applicable == 'true' |
166 | | - uses: ./.github/actions/setup |
167 | | - with: |
168 | | - install: true |
169 | | - install-javascript: ${{ steps.applicability.outputs.javascript == 'true' }} |
170 | | - install-python: ${{ steps.applicability.outputs.python == 'true' }} |
171 | | - install-rust: ${{ steps.applicability.outputs.rust == 'true' }} |
172 | | - cache-build: false |
173 | | - cache-environment: false |
174 | | - cache-save: ${{ github.event_name == 'push' }} |
175 | | - task: smoke |
176 | | - task-javascript: ${{ steps.applicability.outputs.javascript }} |
177 | | - task-python: ${{ steps.applicability.outputs.python }} |
178 | | - task-rust: ${{ steps.applicability.outputs.rust }} |
179 | | - - name: Smoke |
180 | | - if: steps.applicability.outputs.applicable == 'true' |
181 | | - run: bash .github/scripts/ci.sh smoke |
| 14 | + test: |
| 15 | + name: Test |
| 16 | + uses: 0xPlayerOne/code-foundry/.github/workflows/reusable-test.yml@v0.8.0 |
| 17 | + secrets: inherit |
0 commit comments