Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): bring back embargo test #8981

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci-dgraph-embargo-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci-dgraph-embargo-tests
on:
push:
branches:
- main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not on release branches?

schedule:
- cron: "0 0 * * *" # run workflow daily
jobs:
build:
name: dgraph-embargo-tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Dgraph repo
uses: actions/checkout@v3
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVERSION }}
- name: Build dgraph binary
run: make docker-image # also builds dgraph binary
- name: Move dgraph binary to gopath
run: mv dgraph/dgraph ~/go/bin/dgraph
- name: Get Python Version
run: |
#!/bin/bash
cd contrib/embargo
PYTHON_VERSION=$({ [ -f .python-version ] && cat .python-version; })
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does it say @v4? Is that version of the GitHub action?

with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
cd contrib/embargo
python -m pip install -r requirements.txt
- name: Run tests
run: cd contrib/embargo && GOPATH=~/go bash run.sh
2 changes: 1 addition & 1 deletion contrib/embargo/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
embargo
3.7
24 changes: 12 additions & 12 deletions contrib/embargo/embargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

containers:
zero1:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "zero1"
# Needed for DNS with network set to udn
container_name: "zero1"
Expand All @@ -17,14 +17,14 @@ containers:
expose:
- 5080
- 6080
command: /gobin/dgraph ${COVERAGE_OUTPUT} zero --my=zero1:5080 --replicas 3 --raft="idx=1;" --bindall --expose_trace --logtostderr -v=3
command: /gobin/dgraph zero --my=zero1:5080 --replicas 3 --raft="idx=1;" --bindall --expose_trace --logtostderr -v=3
volumes:
# Note: Any environment variables must use the ${} syntax.
# ${GOPATH} works, $GOPATH does not.
"${GOPATH}/bin": "/gobin"

zero2:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "zero2"
container_name: "zero2"
ports:
Expand All @@ -33,12 +33,12 @@ containers:
expose:
- 5082
- 6082
command: /gobin/dgraph ${COVERAGE_OUTPUT} zero -o 2 --my=zero2:5082 --replicas 3 --peer=zero1:5080 --raft="idx=2;" --bindall --expose_trace --logtostderr -v=3
command: /gobin/dgraph zero -o 2 --my=zero2:5082 --replicas 3 --peer=zero1:5080 --raft="idx=2;" --bindall --expose_trace --logtostderr -v=3
volumes:
"${GOPATH}/bin": "/gobin"

zero3:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "zero3"
container_name: "zero3"
ports:
Expand All @@ -47,12 +47,12 @@ containers:
expose:
- 5083
- 6083
command: /gobin/dgraph ${COVERAGE_OUTPUT} zero -o 3 --my=zero3:5083 --replicas 3 --peer=zero1:5080 --raft="idx=3;" --bindall --expose_trace --logtostderr -v=3
command: /gobin/dgraph zero -o 3 --my=zero3:5083 --replicas 3 --peer=zero1:5080 --raft="idx=3;" --bindall --expose_trace --logtostderr -v=3
volumes:
"${GOPATH}/bin": "/gobin"

dg1:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "dg1"
container_name: "dg1"
ports:
Expand All @@ -61,13 +61,13 @@ containers:
expose:
- 8180
- 9180
command: /gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=dg1:7180 --zero=zero1:5080,zero2:5082,zero3:5083 -o 100 --expose_trace --logtostderr -v=3
command: /gobin/dgraph alpha --my=dg1:7180 --zero=zero1:5080,zero2:5082,zero3:5083 -o 100 --expose_trace --logtostderr -v=3
--trace "ratio=1.0;"
volumes:
"${GOPATH}/bin": "/gobin"

dg2:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "dg2"
container_name: "dg2"
ports:
Expand All @@ -77,13 +77,13 @@ containers:
- 8182
- 9182
start_delay: 8
command: /gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=dg2:7182 --zero=zero1:5080,zero2:5082,zero3:5083 -o 102 --expose_trace --logtostderr -v=3
command: /gobin/dgraph alpha --my=dg2:7182 --zero=zero1:5080,zero2:5082,zero3:5083 -o 102 --expose_trace --logtostderr -v=3
--trace "ratio=1.0;"
volumes:
"${GOPATH}/bin": "/gobin"

dg3:
image: dgraph/dgraph:latest
image: dgraph/dgraph:local
hostname: "dg3"
container_name: "dg3"
ports:
Expand All @@ -93,7 +93,7 @@ containers:
- 8183
- 9183
start_delay: 16
command: /gobin/dgraph ${COVERAGE_OUTPUT} alpha --my=dg3:7183 --zero=zero1:5080,zero2:5082,zero3:5083 -o 103 --expose_trace --logtostderr -v=3
command: /gobin/dgraph alpha --my=dg3:7183 --zero=zero1:5080,zero2:5082,zero3:5083 -o 103 --expose_trace --logtostderr -v=3
--trace "ratio=1.0;"
volumes:
"${GOPATH}/bin": "/gobin"
Expand Down
18 changes: 9 additions & 9 deletions contrib/embargo/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
args==0.1.0
certifi==2023.7.22
certifi==2020.4.5.1
chardet==3.0.4
click==7.1.2
clint==0.5.1
docker==4.2.0
embargo==0.1.1
Flask==2.3.2
Flask==0.12.5
gevent==1.4.0
greenlet==0.4.15
httpie==3.1.0
httpie==2.1.0
idna==2.9
itsdangerous==1.1.0
Jinja2==2.11.3
Jinja2==2.11.2
MarkupSafe==1.1.1
Pygments==2.15.0
PyYAML==5.4
requests==2.31.0
Pygments==2.6.1
PyYAML==5.3.1
requests==2.23.0
six==1.15.0
urllib3==1.26.5
urllib3==1.25.9
websocket-client==0.57.0
Werkzeug==2.2.3
Werkzeug==0.16.1