From 6c8c50e65a92e3bdc2ef0da32f5df68ea096de99 Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Mon, 30 Jan 2023 16:51:05 +0100 Subject: [PATCH] enhance: attempt to run db tests as part of GH actions --- .env.example-full | 8 +++++++- .env.example-grapher | 6 ++++++ .github/workflows/ci.yml | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.env.example-full b/.env.example-full index 455692610a..1aee465e5d 100644 --- a/.env.example-full +++ b/.env.example-full @@ -9,6 +9,12 @@ GRAPHER_DB_PASS=grapher GRAPHER_DB_HOST=127.0.0.1 GRAPHER_DB_PORT=3307 +GRAPHER_TEST_DB_NAME=graphertest +GRAPHER_TEST_DB_USER=graphertest +GRAPHER_TEST_DB_PASS=graphertest +GRAPHER_TEST_DB_HOST=127.0.0.1 +GRAPHER_TEST_DB_PORT=3308 + WORDPRESS_DB_NAME=wordpress WORDPRESS_DB_USER=wordpress WORDPRESS_DB_PASS=wordpress @@ -24,4 +30,4 @@ WORDPRESS_API_PASS=admin GDOCS_PRIVATE_KEY='' GDOCS_CLIENT_EMAIL='' GDOCS_CLIENT_ID='' -GDOCS_BASIC_ARTICLE_TEMPLATE_URL='' \ No newline at end of file +GDOCS_BASIC_ARTICLE_TEMPLATE_URL='' diff --git a/.env.example-grapher b/.env.example-grapher index b0a69f77da..f4c4ed027e 100644 --- a/.env.example-grapher +++ b/.env.example-grapher @@ -8,3 +8,9 @@ GRAPHER_DB_USER=grapher GRAPHER_DB_PASS=grapher GRAPHER_DB_HOST=127.0.0.1 GRAPHER_DB_PORT=3307 + +GRAPHER_TEST_DB_NAME=graphertest +GRAPHER_TEST_DB_USER=graphertest +GRAPHER_TEST_DB_PASS=graphertest +GRAPHER_TEST_DB_HOST=127.0.0.1 +GRAPHER_TEST_DB_PORT=3308 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc70d73c7b..52892c2cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,22 @@ jobs: testcheck: runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - uses: ./.github/actions/setup-node-yarn-deps + + - name: Install dependencies + run: cp .env.exampe-grapher .env + shell: bash + + - name: Build and run db tests + run: make dbtest + + testdbcheck: + runs-on: ubuntu-latest + steps: - name: Clone repository uses: actions/checkout@v3