-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stick to python 3.10 version (as the best for psychopy), and add pyte…
…st workflow action placeholder, #124.
- Loading branch information
Showing
2 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
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
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 }} |
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