Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

fix ci #1

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test

on:
push:
branches: [ master ]
branches: [ _disable ]

env:
CARGO_TERM_COLOR: always
Expand Down
56 changes: 46 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ env:
CARGO_TERM_COLOR: always

jobs:
test:
name: run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [stable, beta, nightly]
test-web:
name: test in browser
runs-on: ubuntu-latest
env:
TARGET: no-modules

steps:
- name: checkout
Expand All @@ -27,8 +24,47 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: stable
override: true

- name: install node
uses: actions/setup-node@v2
with:
node-version: '15'

- name: install puppeteer
run: yarn install

- name: install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: test
run: make tests/no-modules

test-node:
name: test with node
runs-on: ubuntu-latest
env:
TARGET: nodejs

steps:
- name: checkout
uses: actions/checkout@v2

- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: install node
uses: actions/setup-node@v2
with:
node-version: '15'

- name: install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: test
run: cargo test
run: make tests/nodejs
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"license": "MIT",
"devDependencies": {
"puppeteer": "^12.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/build.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tests/no-modules: build/no-modules/lib_ruby_parser.js
node tests/test-web.js

tests/node: build/nodejs/lib_ruby_parser.js
tests/nodejs: build/nodejs/lib_ruby_parser.js
node tests/test-node.js