From 7b7fa8f1e1ea6576b191afc4a1c54c72f09b2be1 Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Wed, 8 Dec 2021 21:11:38 +0300 Subject: [PATCH] fix ci --- .github/workflows/gh-pages.yml | 2 +- .github/workflows/test.yml | 56 ++++++++++++++++++++++++++++------ package.json | 1 + tests/build.mk | 2 +- 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 3f681f1..345504c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -2,7 +2,7 @@ name: test on: push: - branches: [ master ] + branches: [ _disable ] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ab931a..93a7b47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/package.json b/package.json index 3302134..689c4cd 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "license": "MIT", "devDependencies": { "puppeteer": "^12.0.1" } diff --git a/tests/build.mk b/tests/build.mk index 5f88dbe..6cdf368 100644 --- a/tests/build.mk +++ b/tests/build.mk @@ -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