-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3c2873
commit a8d979b
Showing
12 changed files
with
7,359 additions
and
7,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
ci: | ||
name: CI - OS ${{ matrix.os }}, Node.js ${{ matrix.node-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
node-version: [20.x, 21.x, 22.x] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- name: Install | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Build | ||
run: npm run prod | ||
- name: Test | ||
run: npm run test | ||
- name: Upload coverage report | ||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | ||
uses: codecov/codecov-action@v3 | ||
- name: SonarCloud Scan | ||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
ci: | ||
name: CI - OS ${{ matrix.os }}, Node.js ${{ matrix.node-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
node-version: [20.x, 21.x, 22.x] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- name: Install | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Build | ||
run: npm run prod | ||
- name: Test | ||
run: npm run test | ||
- name: Upload coverage report | ||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | ||
uses: codecov/codecov-action@v3 | ||
- name: SonarCloud Scan | ||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ignore: | ||
- '__tests__/**/*' | ||
- 'example/**/*' | ||
- '__tests__/**/*' | ||
- 'example/**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const Rand = require('../../dist/rand-seed').default; | ||
const PRNG = require('../../dist/rand-seed'); | ||
|
||
let rand = new Rand('1234', PRNG.mulberry32); | ||
const result1 = Array.from({ length: 10 }, () => rand.next()); | ||
|
||
rand = new Rand('1234'); | ||
const result2 = Array.from({ length: 10 }, () => rand.next()); | ||
|
||
console.log('RESULT1:', result1); | ||
console.log('RESULT2:', result2); | ||
console.log('RESULT1 == RESULT2:', JSON.stringify(result1) === JSON.stringify(result2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "example", | ||
"version": "1.0.0", | ||
"description": "A simple example of rand-seed", | ||
"main": "index.js", | ||
"type": "module", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/michaeldzjap/rand-seed.git" | ||
}, | ||
"keywords": [ | ||
"random", | ||
"seed", | ||
"prng" | ||
], | ||
"author": "Michael Dzjaparidze", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/michaeldzjap/rand-seed/issues" | ||
}, | ||
"homepage": "https://github.com/michaeldzjap/rand-seed#readme" | ||
} |
Oops, something went wrong.