Skip to content

Commit

Permalink
Stick to python 3.10 version (as the best for psychopy), and add pyte…
Browse files Browse the repository at this point in the history
…st workflow action placeholder, #124.
  • Loading branch information
vmdocua committed Dec 16, 2024
1 parent a940e46 commit 49f1939
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Test with pytest and hatch

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
pytest:
name: Test with pytest
runs-on: ubuntu-latest
strategy:
matrix:
python:
- '3.10'
steps:
- name: Configure environment
run: |
git config --global user.name "reprostim-test"
git config --global user.email "[email protected]"
uname -a
date -Is
date -u
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install hatch and virtual environment
run: |
pwd
ls -l
pip install --upgrade pip
pip install hatch
hatch env create
shell: bash

- name: Run pytest
run: |
hatch run pytest --cov=. --cov-report=xml
shell: bash

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "reprostim"
dynamic = ["version"]
description = 'ReproStim is a video capture and recording suite for neuroimaging and psychology experiments.'
readme = "README.md"
requires-python = ">=3.8"
requires-python = "3.10"
license = "MIT"
keywords = []
authors = [
Expand Down Expand Up @@ -65,3 +65,6 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

[tool.pytest.ini_options]
testpaths = ["tests"]

0 comments on commit 49f1939

Please sign in to comment.