mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
CI: launch redis early
This commit is contained in:
6
.github/workflows/coverage.yml
vendored
6
.github/workflows/coverage.yml
vendored
@@ -45,6 +45,9 @@ jobs:
|
|||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: run mcaptcha cache redis instance
|
||||||
|
run: docker run -d -p 6379:6379 mcaptcha/cache
|
||||||
|
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14.x'
|
node-version: '14.x'
|
||||||
@@ -65,9 +68,6 @@ jobs:
|
|||||||
profile: minimal
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: run mcaptcha cache redis instance
|
|
||||||
run: docker run -d -p 6379:6379 mcaptcha/cache
|
|
||||||
|
|
||||||
- name: Run migrations
|
- name: Run migrations
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
6
.github/workflows/linux.yml
vendored
6
.github/workflows/linux.yml
vendored
@@ -50,6 +50,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '14.x'
|
node-version: '14.x'
|
||||||
|
|
||||||
|
- name: run mcaptcha cache redis instance
|
||||||
|
run: docker run -d -p 6379:6379 mcaptcha/cache
|
||||||
|
|
||||||
- name: Install JavaScript Dependencies
|
- name: Install JavaScript Dependencies
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
@@ -79,9 +82,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||||
|
|
||||||
- name: run mcaptcha cache redis instance
|
|
||||||
run: docker run -d -p 6379:6379 mcaptcha/cache
|
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
|
|||||||
@@ -46,5 +46,5 @@ pool = 4
|
|||||||
# port = "5432"
|
# port = "5432"
|
||||||
# username = "batman"
|
# username = "batman"
|
||||||
# password = "somereallycomplicatedBatmanpassword"
|
# password = "somereallycomplicatedBatmanpassword"
|
||||||
url = "redis://127.0.0.1"
|
url = "redis://127.0.0.1:6370"
|
||||||
pool = 4
|
pool = 4
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ pub async fn get_config(
|
|||||||
let payload = payload.into_inner();
|
let payload = payload.into_inner();
|
||||||
match res.exists {
|
match res.exists {
|
||||||
Some(true) => {
|
Some(true) => {
|
||||||
();
|
|
||||||
match data.captcha.get_pow(payload.key.clone()).await {
|
match data.captcha.get_pow(payload.key.clone()).await {
|
||||||
Some(config) => Ok(HttpResponse::Ok().json(config)),
|
Some(config) => Ok(HttpResponse::Ok().json(config)),
|
||||||
None => {
|
None => {
|
||||||
|
|||||||
Reference in New Issue
Block a user