Skip to content

Continuous Integration #853

Continuous Integration

Continuous Integration #853

Workflow file for this run

on:
push:
branches:
- '*'
pull_request:
schedule:
- cron: '13 5 * * *'
name: Continuous Integration
jobs:
ubuntu:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: groot
POSTGRES_USER: groot
POSTGRES_DB: groot
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Prepare env
run: |
mv .env.example .env
cat >> requirements.yml<< EOF
---
roles:
- geerlingguy.postgresql
collections:
- community.postgresql
EOF
- name: Run
run: |
./target/release/groot &
sleep 2
curl -X POST -F '[email protected]' http://127.0.0.1:3030/sync/
sleep 30
ansible-galaxy collection install -vvv community.postgresql -c -s http://127.0.0.1:3030/
macos:
runs-on: macos-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Test
uses: actions-rs/cargo@v1
with:
command: test