Skip to content

Commit 0372b8e

Browse files
authored
Update to alpha.9 + added way to co-develop tlsn-wasm (#99)
1 parent bf01140 commit 0372b8e

File tree

12 files changed

+1503
-2687
lines changed

12 files changed

+1503
-2687
lines changed

.eslintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"build",
3030
"test-build",
3131
"dev-build",
32-
"wasm",
33-
"utils",
32+
"tlsn-wasm",
3433
"webpack.config.js",
3534
"webpack.test.config.js"
3635
]

.github/workflows/build.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
release:
7+
types: [published]
8+
9+
env:
10+
LOCAL-NOTARY: true
11+
LOCAL-WS: false
12+
HEADLESS: true
13+
PUPPETEER_SKIP_DOWNLOAD: true
14+
15+
jobs:
16+
build-and-test:
17+
name: Build and test
18+
runs-on: ubuntu-latest
19+
env:
20+
RELEASE_MODE: 'dry-run' # dry-run by default, will be set to 'publish' for release builds
21+
services:
22+
notary-server:
23+
image: ghcr.io/tlsnotary/tlsn/notary-server:v0.1.0-alpha.9
24+
env:
25+
NOTARY_SERVER__TLS__ENABLED: false
26+
ports:
27+
- 7047:7047
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Checkout tlsn
33+
uses: actions/checkout@v4
34+
with:
35+
repository: tlsnotary/tlsn
36+
path: tlsn-wasm/tlsn
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 18
42+
cache: 'npm'
43+
44+
- name: Install stable nightly toolchain
45+
uses: dtolnay/rust-toolchain@stable
46+
with:
47+
targets: wasm32-unknown-unknown
48+
components: rust-src
49+
toolchain: nightly
50+
51+
- name: Use caching
52+
uses: Swatinem/[email protected]
53+
with:
54+
workspaces: tlsn-wasm/tlsn -> target
55+
cache-on-failure: true
56+
57+
- name: Install wasm-pack
58+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
59+
60+
- name: Install dependencies
61+
run: npm ci
62+
63+
- name: Build
64+
run: npm run build
65+
66+
- name: Lint
67+
run: npm run lint
68+
69+
- name: Install Chrome
70+
uses: browser-actions/setup-chrome@v1
71+
id: setup-chrome
72+
with:
73+
chrome-version: 121.0.6167.85
74+
75+
- name: Set CHROME_PATH environment variable
76+
run: echo "CHROME_PATH=${{ steps.setup-chrome.outputs['chrome-path'] }}" >> $GITHUB_ENV
77+
78+
- name: Test
79+
run: npm run test
80+
81+
- name: Determine release type (dry-run or publish)
82+
run: |
83+
if [[ $GITHUB_EVENT_NAME == "release" ]]; then
84+
echo "RELEASE_MODE=publish" >> $GITHUB_ENV
85+
else
86+
echo "RELEASE_MODE=dry-run" >> $GITHUB_ENV
87+
fi
88+
89+
- name: Dry-run release (non-release builds)
90+
if: env.RELEASE_MODE == 'dry-run'
91+
run: npm publish --dry-run
92+
93+
- name: Publish to npm (GitHub Release)
94+
if: env.RELEASE_MODE == 'publish'
95+
env:
96+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
97+
run: npm publish

.github/workflows/test.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)