mirror of
https://codeberg.org/demostf/api-test.git
synced 2026-06-03 17:44:07 +02:00
ci
This commit is contained in:
parent
ea306cbdba
commit
751fe5a5a9
1 changed files with 63 additions and 0 deletions
63
.github/workflows/rust.yml
vendored
Normal file
63
.github/workflows/rust.yml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
on: [push, pull_request]
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run
|
||||
|
||||
services:
|
||||
api-test-db:
|
||||
image: demostf/db
|
||||
env:
|
||||
POSTGRES_PASSWORD: test
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
api:
|
||||
image: demostf/api
|
||||
env:
|
||||
DEMO_ROOT: /tmp
|
||||
DEMO_HOST: localhost
|
||||
DB_TYPE: pgsql
|
||||
DB_HOST: api-test-db
|
||||
DB_PORT: 5432
|
||||
DB_DATABASE: postgres
|
||||
DB_USERNAME: postgres
|
||||
DB_PASSWORD: test
|
||||
APP_ROOT: https://api.localhost
|
||||
EDIT_SECRET: edit
|
||||
api-test:
|
||||
image: demostf/api-nginx-test
|
||||
env:
|
||||
POSTGRES_PASSWORD: test
|
||||
ports:
|
||||
- 80:80
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- uses: actions-rs/cargo@v1
|
||||
env:
|
||||
DB_URL: postgres://postgres:test@localhost/postgres
|
||||
API_ROOT: http://localhost/
|
||||
EDIT_KEY: edit
|
||||
with:
|
||||
command: run
|
||||
Loading…
Add table
Add a link
Reference in a new issue