. b Fix macOS Adobe DNG Converter timeout warnings #389
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ExifImageRenamer | |
on: | |
push: | |
branches: | |
- '**' # Run on all branch pushes | |
tags: | |
- 'rel-patch' | |
- 'rel-minor' | |
- 'rel-major' | |
pull_request: | |
permissions: | |
contents: write # Needed for handle-release-tags job to push tags | |
# Prevent duplicate runs - prioritize by commit SHA | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.sha }} | |
cancel-in-progress: true | |
env: | |
ENV: prod | |
jobs: | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Ruff lint | |
uses: astral-sh/ruff-action@v3 | |
with: | |
args: check | |
unit-tests: | |
name: Run on ${{ matrix.py }} - ${{ matrix.os }} | |
needs: ruff | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
# os: [ubuntu-latest] | |
os: [ ubuntu, macOS, windows ] | |
py: [ "3.12", "3.13"] | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: setup python ${{ matrix.py }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Check runner | |
if: ${{ !contains(matrix.os, 'windows') }} | |
run: | | |
.github/scripts/AgentInfo.sh | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Python Info | |
run: | | |
echo "" | |
echo "------------------------" | |
echo "Python version" | |
echo "------------------------" | |
python --version | |
echo "" | |
echo "------------------------" | |
echo "Python3 version" | |
echo "------------------------" | |
python3 --version | |
- name: install dependencies | |
run: uv sync | |
# - name: install tox-gh | |
# run: python -m pip install tox-gh | |
- name: run unit tests | |
run: uv run pytest | |
# coverage has a problem with windows so not running it if windows OS | |
- name: run coverage | |
if: ${{ !cancelled() }} | |
run: uv run pytest --cov --cov-report=xml | |
- name: Upload coverage to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./coverage.xml | |
flags: pytest | |
name: codecov-coverage | |
handle-release-tags: | |
name: Handle Release Tags | |
needs: [ruff, unit-tests] | |
runs-on: ubuntu-latest | |
if: always() && !cancelled() # Run whether tests pass or fail, but not if cancelled due to concurrency | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.RELEASE_TOKEN || secrets.GITHUB_TOKEN }} | |
persist-credentials: true | |
- name: Handle release tags | |
run: ./.github/scripts/handle_release_tags.sh "${{ needs.ruff.result }}" "${{ needs.unit-tests.result }}" "${{ github.ref_name }}" |