add indexes #491
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12.4-alpine | |
env: | |
POSTGRES_DB: movie_queue | |
POSTGRES_PASSWORD: 2UtcMAAvNuBHPqK9 | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install libpq-dev && rustup update | |
- name: Clippy | |
run: cargo clippy -- -W clippy::pedantic | |
- name: Outdated | |
run: | | |
cargo install cargo-outdated && \ | |
cargo outdated -d2 | |
# - name: Unused Deps | |
# run: | | |
# rustup update nightly && \ | |
# cargo +nightly install cargo-udeps && \ | |
# cargo +nightly udeps | |
- name: Build | |
run: | | |
cargo build --workspace && \ | |
./target/debug/movie-queue-cli run-migrations | |
env: | |
PGURL: postgresql://postgres:2UtcMAAvNuBHPqK9@localhost:5432/movie_queue | |
MOVIE_DIRS: /tmp | |
MUSIC_DIRS: /tmp | |
- name: Run tests | |
run: | | |
cargo test --verbose --workspace && \ | |
cargo install cargo-tarpaulin --version 0.18.0-alpha3 && \ | |
cargo tarpaulin --verbose --all-features --workspace --out Xml --avoid-cfg-tarpaulin | |
- name: Upload to codecov.io | |
uses: codecov/[email protected] | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: code-coverage-report | |
path: cobertura.xml |