Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tsp-client] Add gh action for tests #8847

Merged
merged 10 commits into from
Aug 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/tsp-client-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: tsp-client - Test

on:
push:
branches:
- main
pull_request:
paths:
- tools/tsp-client/**
catalinaperalta marked this conversation as resolved.
Show resolved Hide resolved

jobs:
tsp-client:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.19, 20]
catalinaperalta marked this conversation as resolved.
Show resolved Hide resolved
exclude:
- os: ubuntu-latest
node-version: 20
- os: windows-latest
node-version: 18.19

runs-on: ${{ matrix.os }}

steps:
- if: runner.os == 'Windows'
run: git config --global core.longpaths true
shell: pwsh

- name: Use Node ${{ matrix.node-version }}.x
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}.x

- run: npm ci
shell: pwsh

- run: npm ls -a
shell: pwsh
continue-on-error: true

- run: npm run build
shell: pwsh
working-directory: ./tools/tsp-client

- run: npm run test
shell: pwsh
working-directory: ./tools/tsp-client

- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.os }}-${{ matrix.node-version }}
path: ./tools/tsp-client/coverage
if-no-files-found: ignore