Skip to content

Rocket 0.5

Rocket 0.5 #79

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build-server:
runs-on: ubuntu-latest
container: willsquire/diesel-cli
services:
postgres:
image: postgres
env:
POSTGRES_DB: wartid
POSTGRES_USER: wartid
POSTGRES_PASSWORD: wartid
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Test DB, install uuid-ossp, and interrupt action if it doesn't work
run: psql postgres://wartid:wartid@localhost/wartid --command='create extension "uuid-ossp";'
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- name: Apply migrations
working-directory: ./wartid-server/
run: diesel migration run
env:
DATABASE_URL: postgres://wartid:wartid@localhost/wartid
- name: Build --all-features
working-directory: ./wartid-server/
run: cargo build --release --all-features --verbose
- name: Build --no-default-features
working-directory: ./wartid-server/
run: cargo build --release --no-default-features --verbose
- name: Run tests
working-directory: ./wartid-server/
run: cargo test --verbose
- uses: actions/upload-artifact@v3
with:
name: wartid-server
path: ./target/release/wartid-server