Skip to content

Commit

Permalink
Update testing workflow with dev dependencies and full python coverage (
Browse files Browse the repository at this point in the history
#22)

* Update run-tests.yml

Add new tests to testing workflow with pytest

* Update pyproject.toml

Add pytest as dev dependency

* Update run-tests.yml

use .[dev] install for test workflow

Set to test all supported python versions with matrix setup

* Set up testing for PRs and pushes separately
  • Loading branch information
egrace479 authored Aug 1, 2024
1 parent 2c986a2 commit e9d4c7d
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 25 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/run-pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: run-PR-tests

on:
pull_request:
push:
branches: main

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install dependencies
run: pip install .[dev]
shell: bash

- name: run tests
run: pytest
shell: bash
28 changes: 28 additions & 0 deletions .github/workflows/run-push-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: run-push-tests

on:
push:

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install dependencies
run: pip install .[dev]
shell: bash

- name: run tests
run: pytest
shell: bash
25 changes: 0 additions & 25 deletions .github/workflows/run-tests.yml

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ dependencies = [
"pillow",
"sum-buddy @ git+https://github.com/Imageomics/sum-buddy.git@v0.1.0-alpha",
]

[project.optional-dependencies]
dev = ["pytest"]

keywords = [
"downloader",
"csv",
Expand Down

0 comments on commit e9d4c7d

Please sign in to comment.