Skip to content

Commit 320801a

Browse files
bors[bot]MikailBag
andauthored
Merge #5
5: Add basic integration tests r=MikailBag a=MikailBag Co-authored-by: Mikail Bagishov <[email protected]>
2 parents 44d01ba + f7e5d5e commit 320801a

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,44 @@ jobs:
2525
run: scan-build -o analyzer-report make -C jtl/cmake-build -j4
2626
- name: Check that report is empty
2727
run: '[ -z "$(ls -A analyzer-report)" ]'
28+
e2e-build:
29+
env:
30+
DOCKER_BUILDKIT: "1"
31+
runs-on: ubuntu-20.04
32+
timeout-minutes: 15
33+
steps:
34+
- name: Fetch sources
35+
uses: actions/checkout@v2
36+
- name: Setup cache
37+
uses: Swatinem/rust-cache@v1
38+
- name: Build e2e artifacts
39+
run: bash ci/e2e-build.sh
40+
- name: Upload e2e artifacts
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: e2e-artifacts
44+
path: e2e-artifacts
45+
retention-days: "2"
46+
e2e-run:
47+
needs: e2e-build
48+
runs-on: ubuntu-20.04
49+
timeout-minutes: 15
50+
steps:
51+
- name: Fetch sources
52+
uses: actions/checkout@v2
53+
- name: Download e2e artifacts
54+
uses: actions/download-artifact@v2
55+
with:
56+
name: e2e-artifacts
57+
path: e2e-artifacts
58+
- name: Execute tests
59+
run: bash ci/e2e-run.sh
60+
- name: Upload logs
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: e2e-logs
64+
path: e2e-logs
65+
retention-days: "2"
2866
misspell:
2967
runs-on: ubuntu-20.04
3068
timeout-minutes: 2

bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
delete-merged-branches = true
2-
status = ["check-ci-config", "rustfmt", "rust-unit-tests", "rust-unused-deps", "rust-cargo-deny", "rust-lint", "cpp-lint"]
2+
status = ["check-ci-config", "e2e-build", "e2e-run", "rustfmt", "rust-unit-tests", "rust-unused-deps", "rust-cargo-deny", "rust-lint", "cpp-lint"]
33
timeout-sec = 900

ci/config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# TODO: integration tests
2-
noE2e: true
31
# TODO: add artifacts
42
noPublish: true
53
buildTimeoutMinutes: 15

ci/e2e-build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
mkdir e2e-artifacts
5+
cargo install --path cli
6+
cp ~/.cargo/bin/pps-cli e2e-artifacts/pps-cli

ci/e2e-run.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
sudo chmod +x ./e2e-artifacts/pps-cli
5+
6+
python3 make-build-env.py --out $HOME/build-env
7+
export JJS_PATH=$HOME/build-env
8+
for i in a-plus-b array-sum sqrt; do
9+
mkdir -p ./out/$i
10+
./e2e-artifacts/pps-cli compile --pkg example-problems/$i --out ./out/$i
11+
done

0 commit comments

Comments
 (0)