Files
ohrwurm/.github/workflows/ci.yml
Johannes Heuel 4dc6f51b6c
Some checks failed
tests / fmt (push) Has been cancelled
tests / build (push) Has been cancelled
tests / test (push) Has been cancelled
tests / clippy (push) Has been cancelled
tests / pre-commit (push) Has been cancelled
deploy / release-image (push) Has been cancelled
use github actions
2025-05-03 14:11:44 +02:00

74 lines
2.3 KiB
YAML

name: tests
on:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: sudo apt-get update
- run: sudo apt-get install -y cmake
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@559aa3035a47390ba96088dffa783b5d26da9326 # v1
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: sudo apt-get update
- run: sudo apt-get install -y cmake
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1
- name: Build
run: cargo build --verbose
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: sudo apt-get update
- run: sudo apt-get install -y cmake
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
with:
python-version: '3.13'
- name: Install yt-dlp
run: pip install yt-dlp
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1
- name: Run tests
run: cargo test --verbose --all-features
clippy:
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: sudo apt-get update
- run: sudo apt-get install -y cmake
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1
with:
components: clippy
- name: Run clippy
run: cargo clippy
pre-commit:
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: sudo apt-get update
- run: sudo apt-get install -y cmake
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
with:
python-version: '3.13'
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1
with:
components: rustfmt
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1