Skip to content

trying to fix playing stuff #1371

trying to fix playing stuff

trying to fix playing stuff #1371

Workflow file for this run

name: coverage
on: [push]
jobs:
test:
name: coverage
runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
steps:
- name: Repository Checkout
uses: actions/checkout@v4
- name: "Install dependencies"
run: |
sudo apt-get update && sudo apt-get install -y cmake
shell: bash
- name: "Install Rust"
run: |
rustup toolchain install nightly --profile minimal --no-self-update
rustup default nightly
rustup update
shell: bash
- name: "Install yt-dlp"
run: |
curl -sSL --output /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/download/2024.04.09/yt-dlp_linux
chmod +x /usr/local/bin/yt-dlp
shell: bash
- uses: Swatinem/rust-cache@v2
with:
shared-key: "coverage"
- name: "Install cargo-tarpaulin"
run: |
cargo install cargo-tarpaulin
shell: bash
- name: Install sqlx-cli
run: cargo install sqlx-cli --no-default-features --features postgres
- uses: ikalnytskyi/action-setup-postgres@v4
with:
username: postgres
password: mysecretpassword
database: postgres
port: 5432
id: postgres
- name: Migrate database
env:
DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}
PG_USER: postgres
PG_PASSWORD: mysecretpassword
VIRUSTOTAL_API_KEY: ${{secrets.VIRUSTOTAL_API_KEY}}
run: |
sqlx database create
sqlx migrate run --source migrations/
cargo sqlx prepare --workspace -- --tests --all
- name: Generate code coverage
env:
DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}
PG_USER: postgres
PG_PASSWORD: mysecretpassword
VIRUSTOTAL_API_KEY: ${{secrets.VIRUSTOTAL_API_KEY}}
run: |
cargo tarpaulin --verbose --all --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
fail_ci_if_error: true