mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-28 16:13:17 +00:00
feat: setup CI to use .env_sample and postgres URI
This commit is contained in:
parent
1cd4ce7318
commit
95e7a74559
@ -1 +1 @@
|
|||||||
export POSTGRES_DATABASE_URL=""
|
export POSTGRES_DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
|
||||||
|
|||||||
10
.github/workflows/coverage.yml
vendored
10
.github/workflows/coverage.yml
vendored
@ -51,6 +51,12 @@ jobs:
|
|||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: load env
|
||||||
|
run: |
|
||||||
|
source .env-sample \
|
||||||
|
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: "16.x"
|
node-version: "16.x"
|
||||||
@ -74,7 +80,7 @@ jobs:
|
|||||||
- name: Run migrations
|
- name: Run migrations
|
||||||
run: make migrate
|
run: make migrate
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
|
|
||||||
- name: build frontend
|
- name: build frontend
|
||||||
run: make frontend
|
run: make frontend
|
||||||
@ -85,7 +91,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
args: "-t 1200"
|
args: "-t 1200"
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
||||||
# execution so this value is required for preventing meta tests from
|
# execution so this value is required for preventing meta tests from
|
||||||
# panicking
|
# panicking
|
||||||
|
|||||||
14
.github/workflows/linux.yml
vendored
14
.github/workflows/linux.yml
vendored
@ -55,6 +55,12 @@ jobs:
|
|||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: load env
|
||||||
|
run: |
|
||||||
|
source .env-sample \
|
||||||
|
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16.x'
|
node-version: '16.x'
|
||||||
@ -72,12 +78,12 @@ jobs:
|
|||||||
- name: Run migrations
|
- name: Run migrations
|
||||||
run: make migrate
|
run: make migrate
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make
|
run: make
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
|
|
||||||
# - name: build frontend
|
# - name: build frontend
|
||||||
# run: make frontend
|
# run: make frontend
|
||||||
@ -88,13 +94,13 @@ jobs:
|
|||||||
- name: run tests
|
- name: run tests
|
||||||
run: make test
|
run: make test
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
|
|
||||||
- name: generate documentation
|
- name: generate documentation
|
||||||
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/mCaptcha')
|
if: matrix.version == 'stable' && (github.repository == 'mCaptcha/mCaptcha')
|
||||||
run: make doc
|
run: make doc
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||||
COMPILED_DATE: "2021-07-21"
|
COMPILED_DATE: "2021-07-21"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user