Skip to content
Open
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
13 changes: 1 addition & 12 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -25,18 +25,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

## Try getting the node modules from cache, if failed npm ci
- uses: actions/cache@v2
id: cache-npm
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-${{ env.cache-name }}-
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install npm deps
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

- name: Commit linting
Expand Down
39 changes: 8 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 17.x]
node-version: [18.x]

steps:
- name: Checkout
Expand All @@ -30,34 +30,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Auth to Github Package Docker Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin
## Try getting the node modules from cache, if failed npm ci
- uses: actions/cache@v2
id: cache-npm
with:
path: node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node }}-${{ env.cache-name }}-
${{ runner.OS }}-node-${{ matrix.node }}-
- name: Install npm deps
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

# Start Bee Factory environment
- name: Start Bee Factory environment
run: npm run bee -- --detach

- name: Run unit and integration tests for node
run: npm run test -- --detectOpenHandles

- name: Debug workflow if failed
if: failure()
run: |
KEYS=$(curl -sSf -X POST https://relay.tunshell.com/api/sessions)
curl -sSf -X POST -H "Content-Type: application/json" -d "{\"text\": \"**Bee JS**\nDebug -> \`sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} relay.tunshell.com\`\"}" https://beehive.ethswarm.org/hooks/${{ secrets.WEBHOOK_KEY }}
echo "Connect to github actions node using"
echo "sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} relay.tunshell.com"
curl -sSf https://lets.tunshell.com/init.sh | sh /dev/stdin T $(echo $KEYS | jq -r .peer1_key) ${{ secrets.TUNSHELL_SECRET }} relay.tunshell.com
run: npm ci && npm install -g @fairdatasociety/fdp-play

- name: Start fdp-play environment
run: npm run bee

- name: Tests
run: npm run test
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ allows to have better security model for your web applications.
In order to use Bzz.link, set the `HOSTNAME` environment variable, and either or both of `CID_SUBDOMAINS` and
`ENS_SUBDOMAINS` according to your requirements. You may also need to set up DNS with wildcard subdomain support.

### Reupload pinned content

It can reupload existing pinned content that appear as not retrievable. To enable this, provide `REAUPLOAD_PERIOD` with
the miliseconds that represent the time to periodicaly check pinned content status.

### Examples

#### 1. No postage stamp
Expand Down Expand Up @@ -111,14 +106,6 @@ export POSTAGE_AMOUNT=414720000
npm run start
```

#### Reupload pinned content

```sh
export REUPLOAD_PERIOD=30000

npm run start
```

#### Enable authentication

```sh
Expand Down Expand Up @@ -149,7 +136,6 @@ npm run start
| `LOG_LEVEL` | info | Log level that is outputted (values: `critical`, `error`, `warn`, `info`, `verbose`, `debug`) |
| POSTAGE_EXTENDSTTL | false | Enables extends TTL feature. Works along with POSTAGE_AMOUNT |
| EXPOSE_HASHED_IDENTITY | false | Exposes `x-bee-node` header, which is the hashed identity of the Bee node for identification purposes |
| REUPLOAD_PERIOD | undefined | How frequently are the pinned content checked to be reuploaded. |
| HOMEPAGE | undefined | Swarm hash that loads as the homepage of gateway-proxy |
| REMAP | undefined | Semicolon separated `name=hash` values to rewrite Swarm hashes to human-friendly names |
| ALLOWLIST | undefined | Comma separated list of hashes, ENS domains or CIDs to allow |
Expand Down
4 changes: 0 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,5 @@ export default async (): Promise<Config.InitialOptions> => {

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/'],

moduleNameMapper: {
axios: 'axios/dist/node/axios.cjs',
},
}
}
Loading
Loading