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 a6cc997
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,52 @@ 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: Install JS build deps
run: |
cd js
npm i
- 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 a6cc997

Please sign in to comment.