-
Notifications
You must be signed in to change notification settings - Fork 5
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
a2d5f83
commit 4fae672
Showing
19 changed files
with
479 additions
and
198 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
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,62 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: yarn lint | ||
- uses: gozala/typescript-error-reporter-action@v1.0.8 | ||
- run: yarn build | ||
- run: yarn aegir dep-check | ||
- uses: ipfs/aegir/actions/bundle-size@master | ||
name: size | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
test-node: | ||
needs: check | ||
runs-on: ${{ matrix.os }} | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ROOT_PASSWORD: test-secret-pw | ||
MYSQL_DATABASE: libp2p_rendezvous_db | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [12, 14] | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: yarn | ||
- run: npx nyc --reporter=lcov aegir test -t node -- --bail | ||
- uses: codecov/codecov-action@v1 | ||
test-chrome: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: npx aegir test -t browser -t webworker --bail | ||
test-firefox: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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,27 @@ | ||
USE libp2p_rendezvous_db | ||
|
||
CREATE TABLE IF NOT EXISTS registration ( | ||
id INT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
namespace varchar(255) NOT NULL, | ||
peer_id varchar(255) NOT NULL, | ||
PRIMARY KEY (id), | ||
INDEX (namespace, peer_id) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS cookie ( | ||
id varchar(21), | ||
namespace varchar(255), | ||
reg_id INT UNSIGNED, | ||
peer_id varchar(255) NOT NULL, | ||
created_at datetime DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (id, namespace, reg_id), | ||
INDEX (created_at) | ||
); | ||
|
||
INSERT INTO registration (namespace, peer_id) VALUES ('test-ns', 'QmW8rAgaaA6sRydK1k6vonShQME47aDxaFidbtMevWs73t'); | ||
|
||
SELECT * FROM registration | ||
|
||
SELECT * FROM cookie | ||
|
||
INSERT INTO registration (namespace, peer_id) VALUES ('test-ns', 'QmZqCdSzgpsmB3Qweb9s4fojAoqELWzqku21UVrqtVSKi4'); |
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
Oops, something went wrong.