Adjust name in pre-commit output (#62) #103
This file contains 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
# This workflow builds exif-stripper on Mac, Linux, and Windows for | |
# multiple versions of Python to confirm it can be properly installed. | |
# | |
# Based on https://github.com/stefmolin/data-morph/blob/main/.github/workflows/ci.yml | |
# | |
# Author: Stefanie Molin | |
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- '**' | |
- '!.github/**' | |
- '.github/workflows/ci.yml' | |
tags: [ "v*" ] | |
pull_request: | |
paths: | |
- '**' | |
- '!.github/**' | |
- '.github/workflows/ci.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build with Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -e {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install exif-stripper | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools --upgrade | |
python -m pip install . | |
- name: Check entry point | |
run: exif-stripper --version | |
- name: Install testing dependencies | |
run: python -m pip install '.[dev]' | |
- name: Validate pre-commit hook | |
run: pre-commit try-repo . strip-exif --all-files | |
- name: Run tests | |
run: pytest | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |