Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: metadata padding #37

Merged
merged 9 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin

# Setup Bee environment
- name: Start Bee Factory environment
run: |
git clone --depth=1 https://github.com/ethersphere/bee-factory.git
chmod +x -R ./bee-factory/scripts
./bee-factory/scripts/environment.sh start --detach --workers=$WORKERS

## Try getting the node modules from cache, if failed npm ci
- uses: actions/cache@v2
id: cache-npm
Expand All @@ -62,6 +55,11 @@ jobs:
- name: Install npm deps
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

# Setup Bee environment
- name: Start Bee Factory environment
run: npm run bee-factory

- name: Run tests
run: npm run test

Expand Down
10 changes: 4 additions & 6 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ export default async (): Promise<Config.InitialOptions> => {
console.log('Creating postage stamps...')
const beeDebugUrl = process.env.BEE_DEBUG_API_URL || 'http://localhost:1635'
const bee = new BeeDebug(beeDebugUrl)
process.env.BEE_POSTAGE = await bee.createPostageBatch('1', 20)
process.env.BEE_POSTAGE = await bee.createPostageBatch('1', 20, {
waitForUsable: true,
waitForUsableTimeout: 120_000,
})
console.log('Queen stamp: ', process.env.BEE_POSTAGE)
// sleep for 11 seconds (10 blocks with ganache block time = 1s)
// needed for postage batches to become usable
// FIXME: sleep should be imported for this, but then we fail with
// Could not find a declaration file for module 'tar-js'
await new Promise<void>(resolve => setTimeout(() => resolve(), 11_000))
} 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
Expand Down
Loading