Skip to content

Commit

Permalink
chore: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry committed Nov 12, 2023
1 parent 42e619d commit 5ec4630
Show file tree
Hide file tree
Showing 4 changed files with 634 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ charset = utf-8
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = false
end_of_line = lf
end_of_line = lf

[*.yml]
indent_style = space
33 changes: 33 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test
on: [pull_request]

jobs:
test-node:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node: [18, 20]
name: Node ${{ matrix.node }} Test
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: dtolnay/rust-toolchain@stable
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: latest
- uses: Swatinem/rust-cache@v2
- name: Restore NPM cache
uses: actions/cache@v3
continue-on-error: true
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: wasm-pack build --release -t nodejs && ./helper/morph-wasm-pack-output.sh
- run: npm run lint
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/target
**/*.rs.bk
Cargo.lock
bin/
pkg/
wasm-pack.log
Expand Down
Loading

0 comments on commit 5ec4630

Please sign in to comment.