This commit is contained in:
Robin Appelman 2020-11-30 19:37:44 +01:00
commit 751fe5a5a9

63
.github/workflows/rust.yml vendored Normal file
View 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