Skip to content

Commit

Permalink
add typescript pr github action
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dixon committed Oct 12, 2024
1 parent 0a16d00 commit bf9c5c5
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/pr_typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: TypeScript CI

on:
pull_request:
branches: [ main ]
paths:
- 'typescript/**'
- '.github/workflows/test_typescript.yaml'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: |
cd typescript
npm ci
- name: Run build
run: |
cd typescript
npm run build
- name: Run TypeScript tests
run: |
cd typescript
npm test

0 comments on commit bf9c5c5

Please sign in to comment.