Skip to content

version bump, replace lazy_static #371

version bump, replace lazy_static

version bump, replace lazy_static #371

Workflow file for this run

name: Rust
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:12.4-alpine
env:
POSTGRES_DB: diary_app_cache
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: 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 --verbose
- name: Run tests
run: |
./target/debug/diary-app-rust run-migrations && \
mkdir -p ${DIARY_PATH} && \
aws s3 cp s3://${DIARY_DB_BUCKET}/diary_entries.sql.gz ${DIARY_PATH}/ && \
gzip -dc ${DIARY_PATH}/diary_entries.sql.gz | psql ${DATABASE_URL} -c "COPY diary_entries FROM STDIN" && \
rm ${DIARY_PATH}/diary_entries.sql.gz && \
cargo test --verbose --all && \
cargo install cargo-tarpaulin && \
cargo tarpaulin --verbose --all-features --workspace --out xml
env:
DATABASE_URL: postgresql://postgres:2UtcMAAvNuBHPqK9@localhost:5432/diary_app_cache
DIARY_DB_BUCKET: diary-db-backup
DIARY_BUCKET: diary_backup_ddboline
DIARY_PATH: /tmp/diary
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
AWS_DEFAULT_REGION: us-east-1
- 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