Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Sep 15, 2024
1 parent da9b04f commit bf74e30
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Demo to GitHub Pages
name: build

on:
push:
Expand All @@ -19,24 +19,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
- name: checkout
uses: actions/checkout@v3

- name: Delete demo/pkg symlink
- name: delete symlink
run: rm -fr demo/pkg

- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust@v1
- name: setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown

- name: Install wasm-pack
- name: install build wasm-pack
uses: qmaru/wasm-pack-action@v0.5.0
with:
version: '0.11.1'
version: 'latest'

- name: Build Rust Miner
- name: build wasm
run: |
bash ./scripts/build-notemine-wasm.sh
Expand All @@ -45,8 +45,14 @@ jobs:
# with:
# node-version: '20'

- name: Install Dependencies
- name: install
run: yarn install

- name: Build with Webpack
run: yarn build
- name: webpack
run: yarn build

- name: uplooad artifact
uses: actions/upload-artifact@v3
with:
name: notemine-build
path: ./
24 changes: 24 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

name: coverage
on:
workflow_dispatch:
workflow_run:
workflows: ["docs"]
branches: ["main"]
types:
- completed
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install
run: yarn install
- name: Test and Coverage
run: yarn coverage
- name: Update Coverage Badge
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@main
22 changes: 12 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Deploy Demo to GitHub Pages
name: test

on:
push:
branches: ["master"]
workflow_dispatch:
workflow_run:
workflows:
- build
types:
- completed

permissions:
contents: read
Expand All @@ -19,14 +24,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: download artifact
uses: actions/download-artifact@v3
with:
name: notemine-build
path: ./

- name: Install
run: yarn install

- name: Webpack
run: yarn build

- name: Vitest
- name: vitest
run: yarn test

0 comments on commit bf74e30

Please sign in to comment.