Skip to content

Commit 8763095

Browse files
bors[bot]MikailBag
andauthored
Merge #131
131: Run end-to-end tests r=MikailBag a=MikailBag Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
2 parents 534c41d + 4a67106 commit 8763095

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

.github/workflows/pr.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,25 @@ jobs:
7777
e2e:
7878
name: e2e
7979
runs-on: "ubuntu-18.04"
80-
needs: build
81-
if: "false" # TODO
8280
steps:
8381
- uses: actions/checkout@v1
84-
- name: download jjs artifacts
85-
uses: actions/download-artifact@v1
86-
with:
87-
name: dist.tgz
88-
path: /opt/jjs
82+
- run: bash scripts/ci-env.sh
83+
- name: build
84+
run: cargo jjs-build --docker
8985
- name: launch jjs
9086
run: docker-compose up --detach
87+
- name: wait for launch
88+
run: cargo run --package util
89+
env:
90+
JJS_WAIT: tcp://localhost:1779
91+
RUST_LOG: util::wait=debug
9192
- name: run tests
9293
run: cargo jjs-test --integration-tests --skip-unit
9394
- name: collect logs
9495
if: always()
95-
run: docker-compose logs > logs.txt
96+
run: |
97+
docker-compose logs --tail=all
98+
docker-compose logs --tail=all > logs.txt
9699
- name: upload logs
97100
if: always()
98101
uses: actions/upload-artifact@v1

bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
status = ['style', 'clippy', 'cpp', 'unit-tests', 'build', 'udeps']
1+
status = ['style', 'clippy', 'cpp', 'unit-tests', 'build', 'udeps', 'e2e']
22
delete-merged-branches = true
33
timeout-sec = 1800

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ services:
1414
- "--sample-contest"
1515
- "--db-url=postgres://db:5432/jjs"
1616
- "--toolchains"
17-
- "--force"
1817
- "--touch=/var/jjs/done.txt"
1918
depends_on:
2019
- db

src/all/tests/judge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn submit(code: &str) -> i32 {
88
.operation(
99
r#"
1010
mutation Submit($runCode: String!) {
11-
submitSimple(toolchain: "cpp", problem: "A", runCode: $runCode, contest: "TODO") {
11+
submitSimple(toolchain: "g++", problem: "A", runCode: $runCode, contest: "TODO") {
1212
id
1313
}
1414
}

src/util/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use util;
2+
3+
fn main() {
4+
util::log::setup();
5+
println!(
6+
"wait spec: {}",
7+
std::env::var("JJS_WAIT").unwrap_or_default()
8+
);
9+
util::wait::wait();
10+
}

0 commit comments

Comments
 (0)