mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 08:08:02 +01:00
In making my last fix to attachments, I found it challenging not having tests to ensure there was no regression. Added pytest with minimal setup and isolated configuration. Created a separate test workflow to keep tests isolated from linting. Tests cover the key elements of the attachment logic: - URL extraction from issue bodies - Filename extraction from different URL types - Filename collision resolution - Manifest duplicate prevention
34 lines
662 B
YAML
34 lines
662 B
YAML
---
|
|
name: "test"
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "master"
|
|
|
|
jobs:
|
|
test:
|
|
name: test
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: "pip"
|
|
- run: pip install -r release-requirements.txt
|
|
- run: pytest tests/ -v
|