Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 94ba6b4

Browse files
fix: ci errors
1 parent f889da2 commit 94ba6b4

File tree

4 files changed

+8
-48
lines changed

4 files changed

+8
-48
lines changed

‎.circleci/config.yml‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,10 @@ jobs:
2121
command: |
2222
docker-compose build
2323
- run:
24-
name: Docker Compose
24+
name: Run Test Docker Compose
2525
command: |
26-
docker-compose -p judgecompose up -d
26+
docker-compose --file docker-compose-test.yml up --abort-on-container-exit
2727
- run:
28-
name: Seed Language Data
29-
command: |
30-
docker exec judgecompose_api_1 scripts/wait-for-it.sh -t 180 api:3737 -- npm run seedlangs
31-
- run:
32-
name: Run Tests
33-
command: |
34-
mkdir -p coverage
35-
docker kill judgecompose_api_1
36-
docker run -t --env-file test.env \
37-
-v "$PWD/coverage:/usr/src/judge-api/coverage" \
38-
--network judgecompose_default \
39-
--env "DEBUG=test:* JUDGEAPI_HOST=api JUDGEAPI_PORT=2222" codingblocks/judge-api \
40-
npm run cover
41-
- run:
42-
name: Submit Coverage
28+
name: Submit Code Coverage
4329
command: bash <(curl -s https://codecov.io/bash)
4430

‎.travis.yml‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,9 @@ before_install:
1919

2020
install:
2121
- docker-compose build
22-
- docker-compose -p judgecompose up -d
23-
24-
before_script:
25-
- docker exec judgecompose_api_1 scripts/wait-for-it.sh -t 180 api:3737 -- npm run seedlangs
2622

2723
script:
28-
- docker kill judgecompose_api_1
29-
- mkdir -p coverage
30-
- |
31-
docker run -t --env-file test.env \
32-
-v "$PWD/coverage:/usr/src/judge-api/coverage" \
33-
--network judgecompose_default \
34-
--env "DEBUG=test:* JUDGEAPI_HOST=api JUDGEAPI_PORT=2222" codingblocks/judge-api \
35-
npm run cover
24+
- docker-compose --file docker-compose-test.yml up --abort-on-container-exit
3625

3726
after_success:
3827
- bash <(curl -s https://codecov.io/bash)

‎docker-compose.yml‎ renamed to ‎docker-compose-test.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ services:
1919
api:
2020
build: .
2121
image: codingblocks/judge-api
22+
volumes:
23+
- ./coverage:/usr/src/judge-api/coverage
2224
depends_on:
2325
- postgres
2426
ports:
2527
- "3737:3737"
2628
env_file:
2729
- test.env
30+
command: ./scripts/wait-for-it.sh -t 180 postgres:5432 -- ./scripts/wait-for-it.sh -t 180 rabbitmq:5672 -- npm run cover

‎test/e2e/ProjectScenario.spec.ts‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import DB from '../../src/models';
33
import express = require('express');
44
import { Router } from 'express';
55
import * as utils from '../utils/utils';
6-
6+
importProjectControllerfrom'../../src/routes/api/project/controller';
77

88
const chai = require('chai');
99
const chaiHttp = require('chai-http');
@@ -62,24 +62,6 @@ describe('POST api/project', () => {
6262
expect(res.body.err.message).to.equal('"lang" is required');
6363
});
6464

65-
it('should throw 400 error for incorrect language', async () => {
66-
const params = {
67-
lang: 'abcd',
68-
problem: 'https://minio.cb.lk/public/input',
69-
submission: 'https://minio.cb.lk/public/input',
70-
submissionDirs: 'src',
71-
mode: 'sync',
72-
timelimit: 1
73-
};
74-
75-
const res = await chai.request(app).post(`/api/project`).set({
76-
Authorization: 'Bearer 7718330d2794406c980bdbded6c9dc1d',
77-
Accept: 'application/json'
78-
}).send(params);
79-
80-
expect(res.status).to.equal(400);
81-
});
82-
8365
it('should throw 400 error for problem missing', async () => {
8466
const params = {
8567
lang: 'node',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /