Skip to content

Commit d67aa9d

Browse files
authored
ci(core): seperate amazonq and toolkit ci runners (aws#6828)
## Problem - when a test fails we have to manually inspect the logs to understand if it was amazon q or toolkit ## Solution - separate out amazon q and toolkit test runners ## Notes - web is not seperated out for now since only amazonq has tests for it apparently - I think `test macOS (18.x, stable) and test Windows (18.x, stable)` need to be removed from required in our github configuration, otherwise they will continue to show up but not do anything ## TODO - add this for linux codebuilds in a future PR --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent d9a1041 commit d67aa9d

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

.github/workflows/node.js.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
matrix:
127127
node-version: [18.x]
128128
vscode-version: [minimum, stable, insiders]
129+
package: [amazonq, toolkit]
129130
env:
130131
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
131132
NODE_OPTIONS: '--max-old-space-size=8192'
@@ -141,28 +142,17 @@ jobs:
141142
- name: Tests
142143
uses: coactions/setup-xvfb@v1
143144
with:
144-
run: npm test
145-
- name: Code coverage (Toolkit)
145+
run: npm run test -w packages/${{ matrix.package }}
146+
- name: Code coverage for ${{ matrix.package }}
146147
env:
147148
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
148149
NODE_OPTIONS: ''
149150
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
150151
uses: codecov/codecov-action@v5
151152
with:
152-
flags: macos-toolkit-unittests
153+
flags: macos-${{ matrix.package }}-unittests
153154
verbose: true
154-
file: ./coverage/toolkit/lcov.info
155-
token: ${{ secrets.CODECOV_TOKEN }}
156-
- name: Code coverage (Amazon Q)
157-
env:
158-
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
159-
NODE_OPTIONS: ''
160-
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
161-
uses: codecov/codecov-action@v5
162-
with:
163-
flags: macos-amazonq-unittests
164-
verbose: true
165-
file: ./coverage/amazonq/lcov.info
155+
file: ./coverage/${{ matrix.package }}/lcov.info
166156
token: ${{ secrets.CODECOV_TOKEN }}
167157

168158
web:
@@ -200,6 +190,7 @@ jobs:
200190
matrix:
201191
node-version: [18.x]
202192
vscode-version: [stable, insiders]
193+
package: [amazonq, toolkit]
203194
env:
204195
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
205196
NODE_OPTIONS: '--max-old-space-size=8192'
@@ -211,15 +202,15 @@ jobs:
211202
node-version: ${{ matrix.node-version }}
212203
- run: npm ci
213204
- name: Tests
214-
run: npm test
215-
- name: Code coverage
205+
run: npm run test -w packages/${{ matrix.package }}
206+
- name: Code coverage for ${{ matrix.package }}
216207
env:
217208
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
218209
NODE_OPTIONS: ''
219210
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
220211
uses: codecov/codecov-action@v5
221212
with:
222-
flags: windows-unittests
213+
flags: windows-${{ matrix.package }}-unittests
223214
verbose: true
224-
file: ./coverage/lcov.info
215+
file: ./coverage/${{ matrix.package }}/lcov.info
225216
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)