Skip to content

fix(server): fix youtube_channels_stats method #1006

fix(server): fix youtube_channels_stats method

fix(server): fix youtube_channels_stats method #1006

Workflow file for this run

name: Rust
on:
push:
paths:
- server/**
- .github/workflows/rust.yml
pull_request:
paths:
- server/**
defaults:
run:
working-directory: server
jobs:
ci:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: holostats
POSTGRES_PASSWORD: holostats
POSTGRES_DB: holostats
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Initialize database
run: |
psql postgres://holostats:holostats@localhost/holostats -f sql/schema.sql -f sql/initial.sql
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache target/
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Format
run: cargo fmt -- --check
- name: Create holostats.toml
run: mv holostats.example.toml holostats.toml
- name: Run Test
run: |
psql postgres://holostats:holostats@localhost/holostats -f sql/test.sql
cargo test
env:
DATABASE_URL: postgres://holostats:holostats@localhost/holostats