mirror of
https://github.com/sashacmc/photo-importer.git
synced 2024-11-16 10:08:40 +02:00
Add python workflow and dependencies file
This commit is contained in:
parent
b2aedc4be4
commit
e500193435
33
.github/workflows/python.yml
vendored
Normal file
33
.github/workflows/python.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Python package
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ruff pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
sudo apt install exiftran exiftool pmount
|
||||
- name: Lint with ruff
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
|
||||
# default set of ruff rules with GitHub Annotations
|
||||
ruff --format=github --target-version=py37 .
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
progressbar==2.5
|
||||
psutil==5.9.5
|
||||
PyExifTool==0.5.5
|
Loading…
Reference in New Issue
Block a user