Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MikailBag committed Apr 3, 2020
1 parent 5aabae9 commit fa6b594
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,39 @@ jobs:
e2e:
name: e2e
runs-on: "ubuntu-18.04"
env:
PGDATABASE: jjs
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- run: |
bash scripts/ci-env.sh
sudo apt install -y --no-install-recommends postgresql-client-10 postgresql-10 libunwind-dev
sudo -u postgres createuser runner --superuser
sudo -u postgres psql -c "CREATE ROLE jjs WITH LOGIN PASSWORD 'internal'"
sudo -u postgres createdb jjs
sudo apt install -y --no-install-recommends postgresql-client-10 libunwind-dev
createdb jjs
psql -c "CREATE ROLE jjs WITH LOGIN PASSWORD 'internal'"
- name: Get Rust version
id: rustc_version
run: |
Expand Down Expand Up @@ -136,7 +161,8 @@ jobs:
run: |
sudo dpkg -i /opt/jjs/pkg/jjs.deb
sudo adduser jjs --shell $( which false ) --disabled-password --home /home/jjs
sudo jjs-setup ./test-e2e-profile.yaml upgrade
sudo jjs-setup ./ci-data/test-e2e-profile.yaml upgrade
sudo cp ci-data/env.txt /home/jjs/etc/env.txt
sudo systemctl start jjs-invoker
sudo systemctl start jjs-apiserver
- name: wait for launch
Expand All @@ -152,7 +178,6 @@ jobs:
mkdir logs
sudo journalctl -u jjs-apiserver.service -p debug > logs/apiserver.txt
sudo journalctl -u jjs-invoker.service -p debug > logs/invoker.txt
sudo cat /var/log/postgresql/postgresql-10-main.log > logs/postgres.txt
cat logs/*
- name: upload logs
if: always()
Expand Down
7 changes: 7 additions & 0 deletions ci-data/env.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DATABASE_URL=postgresql://jjs:internal@localhost:5432/jjs
REDIS_URL=redis://localhost:6379
RUST_BACKTRACE=full
JJS_PATH=/opt/jjs
RUST_LOG=info,invoker=debug,apiserver=debug
JJS_SYSTEMD=1
JJS_SECRET_KEY=will_be_deprecated_anyway
File renamed without changes.
1 change: 0 additions & 1 deletion systemd/jjs-apiserver.service.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[Unit]
Description=JJS API server
Requires=postgresql.service
After=postgresql.service

[Service]
Expand Down
1 change: 0 additions & 1 deletion systemd/jjs-invoker.service.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[Unit]
Description=JJS invoker
Requires=postgresql.service
After=postgresql.service

[Service]
Expand Down

0 comments on commit fa6b594

Please sign in to comment.