Skip to content

Commit

Permalink
ci: add js sdk tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nilslice committed Jul 28, 2023
1 parent 4b8d27c commit faf1dbc
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,47 @@ on: [push, pull_request, workflow_dispatch]
name: CI

jobs:
javascript:
name: Test JS
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Deno toolchain
uses: denoland/setup-deno@v1

- name: Install Node toolchain
uses: actions/setup-node@v3
with:
node-version: 20

- name: Run Deno test
run: |
cd js/packages/observe-sdk-stdout
npm i
npm run build:esm
npm run test:deno > out.txt
# test the expected content of the formatted output
ALLOCS=$(cat out.txt | grep "Allocation grew memory by 3 pages" | wc -l)
[ $ALLOCS -eq 10 ]
- name: Run Node test
run: |
cd js/packages/observe-sdk-stdout
npm i
npm run build:cjs
npm link
pushd test/node
npm link @dylibso/observe-sdk-stdout
popd
npm run test:node > out.txt
# test the expected content of the formatted output
ALLOCS=$(cat out.txt | grep "Allocation grew memory by 3 pages" | wc -l)
[ $ALLOCS -eq 10 ]
go:
name: Test Go
runs-on: ubuntu-latest
Expand Down

0 comments on commit faf1dbc

Please sign in to comment.