Skip to content

Commit

Permalink
Updated workflows and test vectors for improved CI/CD and hashing acc…
Browse files Browse the repository at this point in the history
…uracy.

- Modified GitHub Actions workflow for Node.js CI to support multiple Node.js versions and OS platforms.
- Updated package.json and package-lock.json for dependency management.
- Enhanced test coverage in tests/cryptonight_monero.js and tests/test.vectors.js.
- Refined test vectors in set1, set2, and set3 for better hashing validation.
  • Loading branch information
ROZ-MOFUMOFU-ME committed Sep 23, 2024
1 parent 1424209 commit 9f9811b
Show file tree
Hide file tree
Showing 12 changed files with 2,384 additions and 204 deletions.
57 changes: 49 additions & 8 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,63 @@
name: Node.js CI

on:
push:
branches: [ "main", "dev" ]
branches:
- '**'
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
build-legacy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Run build
run: npm install
- name: Verify build
run: echo "Build completed successfully!"
- run: npm i

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
node-version: [16.x, 18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm test
env:
SETS: set3

publish:
runs-on: ubuntu-latest
needs:
- build-legacy
- test
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -397,4 +397,5 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml

# built files
build/
Loading

0 comments on commit 9f9811b

Please sign in to comment.