-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: repair jobs * ci: remove debug version bump * ci: specify exact fdp-play version * feat: harden internals * style: add newline * build: remove unnecessary dependencies
- Loading branch information
Showing
63 changed files
with
6,927 additions
and
4,395 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 |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
"husky", | ||
"ts-node", | ||
"webpack-cli", | ||
"playwright-test" | ||
"playwright-test", | ||
"@types/jest", | ||
"ts-jest" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -16,7 +16,6 @@ on: | |
repository_dispatch: | ||
types: [update-bee] | ||
|
||
|
||
jobs: | ||
create-api-docs-pr: | ||
runs-on: ubuntu-latest | ||
|
@@ -57,13 +56,6 @@ jobs: | |
field: engines.beeApiVersion | ||
value: ${{ env.API_VERSION }} | ||
|
||
- name: Replace Debug API version in package.json | ||
uses: jossef/action-set-json-field@v1 | ||
with: | ||
file: package.json | ||
field: engines.beeDebugApiVersion | ||
value: ${{ env.DEBUG_API_VERSION }} | ||
|
||
- name: Add trailing new-line to package.json | ||
run: printf "\n" >> package.json | ||
|
||
|
@@ -72,30 +64,22 @@ jobs: | |
with: | ||
find: "export const SUPPORTED_BEE_VERSION_EXACT = '.*?'" | ||
replace: "export const SUPPORTED_BEE_VERSION_EXACT = '${{ env.BEE_VERSION_WITH_COMMIT }}'" | ||
include: "src/modules/debug/status.ts" | ||
include: 'src/modules/debug/status.ts' | ||
regex: true | ||
|
||
- name: Replace SUPPORTED_API_VERSION for Status module | ||
uses: jacobtomlinson/gha-find-replace@v2 | ||
with: | ||
find: "export const SUPPORTED_API_VERSION = '.*?'" | ||
replace: "export const SUPPORTED_API_VERSION = '${{ env.API_VERSION }}'" | ||
include: "src/modules/debug/status.ts" | ||
regex: true | ||
|
||
- name: Replace SUPPORTED_DEBUG_API_VERSION for Status module | ||
uses: jacobtomlinson/gha-find-replace@v2 | ||
with: | ||
find: "export const SUPPORTED_DEBUG_API_VERSION = '.*?'" | ||
replace: "export const SUPPORTED_DEBUG_API_VERSION = '${{ env.DEBUG_API_VERSION }}'" | ||
include: "src/modules/debug/status.ts" | ||
include: 'src/modules/debug/status.ts' | ||
regex: true | ||
|
||
- name: Replace README version | ||
uses: jacobtomlinson/gha-find-replace@v2 | ||
with: | ||
find: "<!-- SUPPORTED_BEE_START -->.*?<!-- SUPPORTED_BEE_END -->" | ||
replace: "<!-- SUPPORTED_BEE_START -->${{ env.FINAL_CLEAN_BEE_VERSION }}<!-- SUPPORTED_BEE_END -->" | ||
find: '<!-- SUPPORTED_BEE_START -->.*?<!-- SUPPORTED_BEE_END -->' | ||
replace: '<!-- SUPPORTED_BEE_START -->${{ env.FINAL_CLEAN_BEE_VERSION }}<!-- SUPPORTED_BEE_END -->' | ||
include: README.md | ||
regex: true | ||
|
||
|
@@ -105,11 +89,11 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.REPO_GHA_PAT }} | ||
with: | ||
title: "chore: update to bee ${{ env.FINAL_CLEAN_BEE_VERSION }}" | ||
body: "Updated Bee version ${{ env.BEE_VERSION_WITH_COMMIT }}" | ||
branch: "bee-${{ env.FINAL_CLEAN_BEE_VERSION }}" | ||
commit-message: "chore: update to bee" | ||
author: "bee-worker <[email protected]>" | ||
title: 'chore: update to bee ${{ env.FINAL_CLEAN_BEE_VERSION }}' | ||
body: 'Updated Bee version ${{ env.BEE_VERSION_WITH_COMMIT }}' | ||
branch: 'bee-${{ env.FINAL_CLEAN_BEE_VERSION }}' | ||
commit-message: 'chore: update to bee' | ||
author: 'bee-worker <[email protected]>' | ||
|
||
- uses: joutvhu/get-release@v1 | ||
id: release-notes | ||
|
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 |
---|---|---|
|
@@ -30,4 +30,6 @@ node_modules | |
docs | ||
|
||
*.shape | ||
shaper.ts | ||
shaper.ts | ||
|
||
test/primitives/32mb.bin |
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,88 @@ | ||
/* | ||
* For a detailed explanation regarding each configuration property and type check, visit: | ||
* https://jestjs.io/docs/en/configuration.html | ||
*/ | ||
import type { Config } from '@jest/types' | ||
import { BeeRequestOptions } from './src' | ||
import { createPostageBatch } from './src/modules/debug/stamps' | ||
|
||
import { DEFAULT_BATCH_AMOUNT } from './test/utils' | ||
|
||
export default async (): Promise<Config.InitialOptions> => { | ||
try { | ||
const beeRequestOptions: BeeRequestOptions = { | ||
baseURL: process.env.BEE_API_URL || 'http://127.0.0.1:1633/', | ||
timeout: false, | ||
} | ||
const beePeerRequestOptions: BeeRequestOptions = { | ||
baseURL: process.env.BEE_PEER_API_URL || 'http://127.0.0.1:11633/', | ||
timeout: false, | ||
} | ||
|
||
if (!process.env.BEE_POSTAGE || !process.env.BEE_PEER_POSTAGE) { | ||
console.log('Creating postage stamps...') | ||
|
||
const stampsOrder: { requestOptions: BeeRequestOptions; env: string }[] = [] | ||
|
||
if (!process.env.BEE_POSTAGE) { | ||
stampsOrder.push({ requestOptions: beeRequestOptions, env: 'BEE_POSTAGE' }) | ||
} | ||
|
||
if (!process.env.BEE_PEER_POSTAGE) { | ||
stampsOrder.push({ requestOptions: beePeerRequestOptions, env: 'BEE_PEER_POSTAGE' }) | ||
} | ||
|
||
const stamps = await Promise.all( | ||
stampsOrder.map(async order => | ||
createPostageBatch(order.requestOptions, DEFAULT_BATCH_AMOUNT, 20, { | ||
waitForUsable: true, | ||
}), | ||
), | ||
) | ||
|
||
for (let i = 0; i < stamps.length; i++) { | ||
process.env[stampsOrder[i].env] = stamps[i] | ||
console.log(`${stampsOrder[i].env}: ${stamps[i]}`) | ||
} | ||
|
||
console.log('Waiting for the stamps to be usable') | ||
} | ||
} catch (e) { | ||
// It is possible that for unit tests the Bee nodes does not run | ||
// so we are only logging errors and not leaving them to propagate | ||
console.error(e) | ||
} | ||
|
||
return { | ||
// Indicates whether the coverage information should be collected while executing the test | ||
// collectCoverage: false, | ||
|
||
// The directory where Jest should output its coverage files | ||
coverageDirectory: 'coverage', | ||
|
||
// An array of regexp pattern strings used to skip coverage collection | ||
coveragePathIgnorePatterns: ['/node_modules/'], | ||
|
||
// An array of directory names to be searched recursively up from the requiring module's location | ||
moduleDirectories: ['node_modules'], | ||
|
||
// Run tests from one or more projects | ||
projects: [ | ||
{ | ||
preset: 'ts-jest', | ||
displayName: 'node', | ||
testEnvironment: 'node', | ||
testRegex: 'test/.*\\.spec\\.ts', | ||
}, | ||
] as unknown[] as string[], // bad types | ||
|
||
// The root directory that Jest should scan for tests and modules within | ||
rootDir: 'test', | ||
|
||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped | ||
testPathIgnorePatterns: ['/node_modules/'], | ||
|
||
// Increase timeout since we have long running cryptographic functions | ||
testTimeout: 4 * 60 * 1000, | ||
} | ||
} |
Oops, something went wrong.