Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hayemaxi committed Jan 31, 2024
1 parent 575a3f6 commit 4b0ff9f
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 88 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
* @aws/aws-ides-team
packages/toolkit/src/codewhisperer/ @aws/codewhisperer-team
packages/toolkit/src/amazonqFeatureDev/ @aws/earlybird
packages/toolkit/src/codewhispererChat/ @aws/aws-mynah
packages/toolkit/src/amazonq/ @aws/aws-mynah
185 changes: 99 additions & 86 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,92 +13,105 @@ jobs:
macos:
name: test macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x]
vscode-version: [minimum, stable, insiders]
env:
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
NODE_OPTIONS: '--max-old-space-size=8192'
# strategy:
# fail-fast: false
# matrix:
# node-version: [16.x]
# vscode-version: [minimum, stable, insiders]
# env:
# VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
# NODE_OPTIONS: '--max-old-space-size=8192'
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Tests
uses: coactions/setup-xvfb@v1
with:
run: npm test
- name: Code coverage
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
uses: codecov/codecov-action@v3
with:
verbose: true
file: ./coverage/lcov.info
flags: macos-unittests
- name: Code coverage (CodeWhisperer)
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
uses: codecov/codecov-action@v3
with:
verbose: true
file: ./coverage/lcov.info
flags: codewhisperer
- run: echo 0
# macos:
# name: test macOS
# runs-on: macos-latest
# strategy:
# fail-fast: false
# matrix:
# node-version: [16.x]
# vscode-version: [minimum, stable, insiders]
# env:
# VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
# NODE_OPTIONS: '--max-old-space-size=8192'
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm ci
# - name: Tests
# uses: coactions/setup-xvfb@v1
# with:
# run: npm test
# - name: Code coverage
# env:
# # Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
# NODE_OPTIONS: ''
# if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
# uses: codecov/codecov-action@v3
# with:
# verbose: true
# file: ./coverage/lcov.info
# flags: macos-unittests
# - name: Code coverage (CodeWhisperer)
# env:
# # Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
# NODE_OPTIONS: ''
# if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
# uses: codecov/codecov-action@v3
# with:
# verbose: true
# file: ./coverage/lcov.info
# flags: codewhisperer

windows:
name: test Windows
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
node-version: [16.x]
vscode-version: [stable, insiders]
env:
VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
NODE_OPTIONS: '--max-old-space-size=8192'
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Tests
run: npm test
- name: Code coverage
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
uses: codecov/codecov-action@v3
with:
verbose: true
file: ./coverage/lcov.info
flags: windows-unittests
# windows:
# name: test Windows
# runs-on: windows-2019
# strategy:
# fail-fast: false
# matrix:
# node-version: [16.x]
# vscode-version: [stable, insiders]
# env:
# VSCODE_TEST_VERSION: ${{ matrix.vscode-version }}
# NODE_OPTIONS: '--max-old-space-size=8192'
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm ci
# - name: Tests
# run: npm test
# - name: Code coverage
# env:
# # Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
# NODE_OPTIONS: ''
# if: ${{ github.repository == 'aws/aws-toolkit-vscode' && ( github.ref == 'master' || github.event_name == 'pull_request' ) }}
# uses: codecov/codecov-action@v3
# with:
# verbose: true
# file: ./coverage/lcov.info
# flags: windows-unittests

lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
vscode-version: [stable]
env:
NODE_OPTIONS: '--max-old-space-size=8192'
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run testCompile
- run: npm run lint
# lint:
# name: Lint
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [16.x]
# vscode-version: [stable]
# env:
# NODE_OPTIONS: '--max-old-space-size=8192'
# steps:
# - uses: actions/checkout@v4
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm ci
# - run: npm run testCompile
# - run: npm run lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"lint": "npm run lint -w packages/ && npm run format",
"lintfix": "eslint -c .eslintrc.js --fix --ext .ts packages plugins && npm run formatfix",
"clean": "npm run clean -w packages/ -w plugins/",
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules packages/toolkit/node_modules && npm install"
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules packages/toolkit/node_modules && npm install",
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/"
},
"devDependencies": {
"eslint": "^8.26.0",
Expand Down

0 comments on commit 4b0ff9f

Please sign in to comment.