feat: add MARIA_DATABASE_URL to .env_sample and load maria config in CI
This commit is contained in:
parent
249b6461ee
commit
6f5c09185f
3 changed files with 24 additions and 7 deletions
|
@ -1 +1,2 @@
|
|||
export POSTGRES_DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
|
||||
export MARIA_DATABASE_URL="mysql://maria:password@localhost:3306/maria"
|
||||
|
|
20
.github/workflows/coverage.yml
vendored
20
.github/workflows/coverage.yml
vendored
|
@ -40,6 +40,17 @@ jobs:
|
|||
ports:
|
||||
- 6379:6379
|
||||
|
||||
mcaptcha-smtp:
|
||||
image: maildev/maildev
|
||||
env:
|
||||
MAILDEV_WEB_PORT: "1080"
|
||||
MAILDEV_INCOMING_USER: "admin"
|
||||
MAILDEV_INCOMING_PASS: "password"
|
||||
ports:
|
||||
- 1080:1080
|
||||
- 10025:1025
|
||||
|
||||
|
||||
maria:
|
||||
image: mariadb
|
||||
env: MARIADB_USER:maria
|
||||
|
@ -72,15 +83,14 @@ jobs:
|
|||
- name: load env
|
||||
run: |
|
||||
source .env_sample \
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV \
|
||||
&& echo "MARIA_DATABASE_URL=$MARIA_DATABASE_URL" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "16.x"
|
||||
|
||||
- name: start smtp server
|
||||
run: docker run -d -p 1080:1080 -p 10025:1025 maildev/maildev --incoming-user admin --incoming-pass password
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -98,6 +108,7 @@ jobs:
|
|||
run: make migrate
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
|
||||
- name: build frontend
|
||||
run: make frontend
|
||||
|
@ -110,6 +121,7 @@ jobs:
|
|||
args: "-t 1200"
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
||||
# execution so this value is required for preventing meta tests from
|
||||
# panicking
|
||||
|
|
10
.github/workflows/linux.yml
vendored
10
.github/workflows/linux.yml
vendored
|
@ -83,7 +83,8 @@ jobs:
|
|||
- name: load env
|
||||
run: |
|
||||
source .env_sample \
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV \
|
||||
&& echo "MARIA_DATABASE_URL=$MARIA_DATABASE_URL" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
@ -100,12 +101,13 @@ jobs:
|
|||
run: make migrate
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
|
||||
- name: build
|
||||
run: make
|
||||
env:
|
||||
POSTGRES_DATABASE_URL:
|
||||
"${{ env.POSTGRES_DATABASE_URL }}"
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
|
||||
# - name: build frontend
|
||||
# run: make frontend
|
||||
|
@ -117,6 +119,7 @@ jobs:
|
|||
run: make test
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha'
|
||||
|
@ -134,6 +137,7 @@ jobs:
|
|||
run: make doc
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
COMPILED_DATE: "2021-07-21"
|
||||
|
||||
|
|
Loading…
Reference in a new issue