1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-04 04:53:58 +03:00
Files
YoutubePlaylistSync/.github/workflows/unit-tests.yml
T

56 lines
1.1 KiB
YAML

name: Unit tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "pytest.ini"
- "ytpl-sync-entry.py"
pull_request:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "pytest.ini"
- "ytpl-sync-entry.py"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Run unit tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install project
run: |
set -euo pipefail
python -m pip install --upgrade pip
# Install project (editable) and test deps
python -m pip install -e ".[test]"
- name: Run tests
run: |
set -euo pipefail
pytest -q