-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add modules for interface-blockstore and interface-datastore t…
…ests
- Loading branch information
1 parent
294b249
commit da0ac9c
Showing
23 changed files
with
1,654 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Getting Help on IPFS | ||
url: https://ipfs.io/help | ||
about: All information about how and where to get help on IPFS. | ||
- name: IPFS Official Forum | ||
url: https://discuss.ipfs.io | ||
about: Please post general questions, support requests, and discussions here. |
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,19 @@ | ||
--- | ||
name: Open an issue | ||
about: Only for actionable issues relevant to this repository. | ||
title: '' | ||
labels: need/triage | ||
assignees: '' | ||
|
||
--- | ||
<!-- | ||
Hello! To ensure this issue is correctly addressed as soon as possible by the IPFS team, please try to make sure: | ||
- This issue is relevant to this repository's topic or codebase. | ||
- A clear description is provided. It should includes as much relevant information as possible and clear scope for the issue to be actionable. | ||
FOR GENERAL DISCUSSION, HELP OR QUESTIONS, please see the options at https://ipfs.io/help or head directly to https://discuss.ipfs.io. | ||
(you can delete this section after reading) | ||
--> |
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,68 @@ | ||
# Configuration for welcome - https://github.com/behaviorbot/welcome | ||
|
||
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome | ||
# Comment to be posted to on first time issues | ||
newIssueWelcomeComment: > | ||
Thank you for submitting your first issue to this repository! A maintainer | ||
will be here shortly to triage and review. | ||
In the meantime, please double-check that you have provided all the | ||
necessary information to make this process easy! Any information that can | ||
help save additional round trips is useful! We currently aim to give | ||
initial feedback within **two business days**. If this does not happen, feel | ||
free to leave a comment. | ||
Please keep an eye on how this issue will be labeled, as labels give an | ||
overview of priorities, assignments and additional actions requested by the | ||
maintainers: | ||
- "Priority" labels will show how urgent this is for the team. | ||
- "Status" labels will show if this is ready to be worked on, blocked, or in progress. | ||
- "Need" labels will indicate if additional input or analysis is required. | ||
Finally, remember to use https://discuss.ipfs.io if you just need general | ||
support. | ||
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome | ||
# Comment to be posted to on PRs from first time contributors in your repository | ||
newPRWelcomeComment: > | ||
Thank you for submitting this PR! | ||
A maintainer will be here shortly to review it. | ||
We are super grateful, but we are also overloaded! Help us by making sure | ||
that: | ||
* The context for this PR is clear, with relevant discussion, decisions | ||
and stakeholders linked/mentioned. | ||
* Your contribution itself is clear (code comments, self-review for the | ||
rest) and in its best form. Follow the [code contribution | ||
guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md#code-contribution-guidelines) | ||
if they apply. | ||
Getting other community members to do a review would be great help too on | ||
complex PRs (you can ask in the chats/forums). If you are unsure about | ||
something, just leave us a comment. | ||
Next steps: | ||
* A maintainer will triage and assign priority to this PR, commenting on | ||
any missing things and potentially assigning a reviewer for high | ||
priority items. | ||
* The PR gets reviews, discussed and approvals as needed. | ||
* The PR is merged by maintainers when it has been approved and comments addressed. | ||
We currently aim to provide initial feedback/triaging within **two business | ||
days**. Please keep an eye on any labelling actions, as these will indicate | ||
priorities and status of your contribution. | ||
We are very grateful for your contribution! | ||
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge | ||
# Comment to be posted to on pull requests merged by a first time user | ||
# Currently disabled | ||
#firstPRMergeComment: "" |
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,31 @@ | ||
version: 2 | ||
updates: | ||
- directory: "/packages/interface-blockstore" | ||
package-ecosystem: npm | ||
schedule: | ||
interval: daily | ||
time: "11:00" | ||
|
||
- directory: "/packages/interface-blockstore-tests" | ||
package-ecosystem: npm | ||
schedule: | ||
interval: daily | ||
time: "11:00" | ||
|
||
- directory: "/packages/interface-datastore" | ||
package-ecosystem: npm | ||
schedule: | ||
interval: daily | ||
time: "11:00" | ||
|
||
- directory: "/packages/interface-datastore-tests" | ||
package-ecosystem: npm | ||
schedule: | ||
interval: daily | ||
time: "11:00" | ||
|
||
- directory: "/packages/interface-store" | ||
package-ecosystem: npm | ||
schedule: | ||
interval: daily | ||
time: "11:00" |
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,95 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
project: | ||
- packages/interface-blockstore | ||
- packages/interface-blockstore-tests | ||
- packages/interface-datastore | ||
- packages/interface-datastore-tests | ||
- packages/interface-store | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build types | ||
run: npm run build | ||
- name: Typecheck ${{ matrix.project }} | ||
uses: gozala/typescript-error-reporter-action@v1.0.8 | ||
with: | ||
project: ${{ matrix.project }} | ||
- run: npx aegir build | ||
- run: npx aegir dep-check | ||
- uses: ipfs/aegir/actions/bundle-size@master | ||
name: size | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
project: ${{ matrix.project }} | ||
test-node: | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
project: | ||
- packages/interface-blockstore | ||
- packages/interface-blockstore-tests | ||
- packages/interface-datastore | ||
- packages/interface-datastore-tests | ||
- packages/interface-store | ||
needs: check | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
node: ${{ matrix.node-version }} | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npx aegir test -t node --cov --bail | ||
- uses: codecov/codecov-action@v1 | ||
test-chrome: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail | ||
test-firefox: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox | ||
test-electron-main: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-main --bail | ||
test-electron-renderer: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-renderer --bail |
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,4 @@ | ||
dist | ||
node_modules | ||
package-lock.json | ||
docs |
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
Empty file.
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,5 @@ | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
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,19 @@ | ||
The MIT License (MIT) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,37 @@ | ||
# interface-blockstore-tests <!-- omit in toc --> | ||
|
||
> A test suite for [interface-blockstore](https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore) implementations | ||
## Table of Contents <!-- omit in toc --> | ||
|
||
- [Usage](#usage) | ||
- [Contribute](#contribute) | ||
- [License](#license) | ||
|
||
## Usage | ||
|
||
```js | ||
const MyBlockstore = require('./path/to/my-blockstore') | ||
const suite = require('interface-blockstore-tests') | ||
|
||
describe('MyBlockstore', () => { | ||
describe('interface-blockstore compliance tests', () => { | ||
suite({ | ||
setup () { | ||
return new MyBlockstore() | ||
}, | ||
teardown () {} | ||
}) | ||
}) | ||
}) | ||
``` | ||
|
||
## Contribute | ||
|
||
PRs accepted. | ||
|
||
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. | ||
|
||
## License | ||
|
||
[Apache-2.0](LICENSE-APACHE) OR [MIT](LICENSE-MIT) |
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,44 @@ | ||
{ | ||
"name": "interface-blockstore-tests", | ||
"version": "0.0.0", | ||
"description": "Compliance tests for the blockstore interface", | ||
"leadMaintainer": "Alex Potsides <alex.potsides@protocol.ai>", | ||
"main": "src/index.js", | ||
"types": "dist/src/index.d.ts", | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "aegir build", | ||
"lint": "aegir ts -p check && aegir lint", | ||
"test": "echo \"No tests configured\"" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ipfs/interface-blockstore.git" | ||
}, | ||
"keywords": [ | ||
"interface", | ||
"key-value", | ||
"ipfs", | ||
"blockstore" | ||
], | ||
"license": "(Apache-2.0 OR MIT)", | ||
"bugs": { | ||
"url": "https://github.com/ipfs/interface-blockstore/issues" | ||
}, | ||
"homepage": "https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore-tests#readme", | ||
"dependencies": { | ||
"aegir": "^33.1.2", | ||
"interface-blockstore": "^0.1.0", | ||
"it-all": "^1.0.2", | ||
"it-drain": "^1.0.1", | ||
"it-length": "^1.0.2", | ||
"multiformats": "^9.1.0", | ||
"uint8arrays": "^2.1.5" | ||
}, | ||
"eslintConfig": { | ||
"extends": "ipfs" | ||
} | ||
} |
Oops, something went wrong.