Skip to content
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
2 changes: 1 addition & 1 deletion .env.example → .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ BRIDGE_USER="youracount@inxt.es"
BRIDGE_PASS="yourbridgePass"
MNEMONIC="test test test test test test test test test test test test test test test test test test test test test test test test"
BUCKET_ID="bucketId"
BRIDGE_URL="https://api.internxt.com"
BRIDGE_URL="https://gateway.internxt.com/network"
STAGE=development
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Unit Tests
on:
push:
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:
unit-tests:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set core.autocrlf to false
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: yarn

- name: Add .env
run: cp .env.template .env

- name: Add .npmrc
run: cp .npmrc.template .npmrc

- name: Install dependencies
run: yarn

- name: Build
run: yarn run build

- name: Run tests
run: yarn test
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn run test
yarn run lint
yarn lint-staged
3 changes: 3 additions & 0 deletions .npmrc.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.yarnpkg.com/

@internxt:registry=https://registry.yarnpkg.com/
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"test": "jest",
"test:watch": "jest --watch --detectOpenHandles",
"lint": "eslint ./src",
"lint:fix": "yarn run lint -- --fix",
"cli": "ts-node --files src/cli/index.ts"
"lint:fix": "yarn run lint --fix",
"cli": "ts-node --files src/cli/index.ts",
"format": "prettier --write src/**/*.{js,jsx,tsx,ts} tests/**/*.{js,jsx,tsx,ts}"
},
"keywords": [],
"author": "",
Expand All @@ -40,7 +41,9 @@
"dotenv": "17.2.2",
"eslint": "9.35.0",
"express": "^5.1.0",
"husky": "9.1.7",
"jest": "30.1.3",
"lint-staged": "16.2.7",
"mocha": "11.7.2",
"prettier": "3.6.2",
"rimraf": "6.0.1",
Expand All @@ -59,5 +62,10 @@
"bip39": "3.1.0",
"undici": "5.29.0",
"winston": "3.17.0"
},
"lint-staged": {
"*.{js,jsx,tsx,ts}": [
"prettier --write"
]
}
}
2 changes: 1 addition & 1 deletion src/api/EnvironmentConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppDetails } from "@internxt/sdk/dist/shared";
import { AppDetails } from '@internxt/sdk/dist/shared';

export interface EnvironmentConfig {
bridgeUrl?: string;
Expand Down
Loading