-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add GA * add Jest * Add mutation and Query tests. * Fix URL * add teardown
- Loading branch information
Showing
14 changed files
with
11,776 additions
and
3,067 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,22 @@ | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Docker Compose | ||
run: docker-compose -f docker-compose.test.yml build | ||
|
||
- name: Run Tests | ||
run: docker-compose -f docker-compose.test.yml run app |
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,10 @@ | ||
FROM node:20 | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
|
||
COPY . . | ||
|
||
CMD ["yarn", "test"] |
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,22 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: . | ||
depends_on: | ||
- dgraph-alpha | ||
environment: | ||
- RUNNING_JEST=true | ||
dgraph-zero: | ||
image: dgraph/dgraph:latest | ||
ports: | ||
- "5080:5080" | ||
command: dgraph zero --my dgraph-zero:5080 | ||
|
||
dgraph-alpha: | ||
image: dgraph/dgraph:latest | ||
ports: | ||
- "8080:8080" | ||
- "9080:9080" | ||
command: dgraph alpha --my dgraph-alpha:7080 --zero dgraph-zero:5080 --security "whitelist=0.0.0.0/0" | ||
depends_on: | ||
- dgraph-zero |
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,11 @@ | ||
module.exports = { | ||
roots: ['<rootDir>/src/__tests__'], | ||
testTimeout: 60000, | ||
testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
}, | ||
globalSetup: '<rootDir>/src/__tests__/setup.ts', | ||
globalTeardown: '<rootDir>/src/__tests__/teardown.ts', | ||
testPathIgnorePatterns: ["<rootDir>/src/__tests__/setup.ts", "<rootDir>/src/__tests__/teardown.ts"], | ||
}; |
Oops, something went wrong.