Tilt tests (#688)

* tests run in tilt / ci

* changed bridge_ui test process

* tests use kube proxy when in ci

* fix: allTests.sh permission

* fix: bridge_ui dockerfile sha for amd64

* fix: bridge_ui should use cra test

* fix: ci tests

Co-authored-by: Evan Gray <battledingo@gmail.com>
This commit is contained in:
chase-45 2022-02-08 03:55:10 -05:00 committed by GitHub
parent 77c064cbd4
commit f7c60b500f
5 changed files with 721 additions and 117 deletions

View File

@ -1 +0,0 @@
REACT_APP_COVALENT_API_KEY=

View File

@ -1,19 +1,20 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
# Derivative of ethereum/Dockerfile, look there for an explanation on how it works.
FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20
FROM node:16-alpine@sha256:f21f35732964a96306a84a8c4b5a829f6d3a0c5163237ff4b6b8b34f8d70064b
RUN mkdir -p /app
WORKDIR /app
ADD . .
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci --prefix ethereum
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci --prefix sdk/js
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm run build --prefix sdk/js
# these are only needed if you are using the local version of the sdk (npm i ../sdk/js)
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm ci --prefix ethereum
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm ci --prefix sdk/js
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm run build --prefix sdk/js
WORKDIR ./bridge_ui

806
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -75,6 +75,9 @@
"@types/node": "^16.6.1",
"@types/numeral": "^2.0.2",
"@types/react-router-dom": "^5.1.8",
"babel-jest": "^26.6.0",
"jest": "^26.6.0",
"jest-watch-typeahead": "^0.6.4",
"prettier": "^2.3.2",
"truffle": "^5.4.1",
"wasm-loader": "^1.3.0"

13
src/__tests__/sdk.js Normal file
View File

@ -0,0 +1,13 @@
const { describe, expect, it } = require("@jest/globals");
const fs = require("fs");
describe("SDK installation", () => {
it("does not import from file path", () => {
const packageFile = fs.readFileSync("./package.json");
const packageObj = JSON.parse(packageFile.toString());
const sdkInstallation =
packageObj?.dependencies?.["@certusone/wormhole-sdk"];
expect(sdkInstallation && !sdkInstallation.includes("file")).toBe(true);
});
});