Skip to content

Commit

Permalink
Update pytester.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazno committed Aug 20, 2023
1 parent 4694e8a commit e3552ab
Showing 1 changed file with 22 additions and 33 deletions.
55 changes: 22 additions & 33 deletions .github/workflows/pytester.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,33 @@
name: Run tests
name: pytest Workflow

on:
push:
branches:
- "main"
- main
pull_request:
branches:
- "main"
- main

jobs:
test:
runs-on: macos-latest

strategy:
matrix:
# Run in all these versions of Python
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10.0']
pytest_job:
name: Run pytest
runs-on: ubuntu-latest

steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v2
# Setup which version of Python to use
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
with:
python-version: ${{ matrix.python-version }}
# Display the Python version being used
- name: Display Python version
run: python -c "import sys; print(sys.version)"
# Install the package using the setup.py
- name: Install package
run: python setup.py install
# Install pytest (you can use some other testing utility)
- name: Install pytest, and requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
# Run the tests. I'm using pytest and the file is in the tests directory.
- name: Run tests
run: pytest tests/test*
- name: Run pytest
run: |
pytest

0 comments on commit e3552ab

Please sign in to comment.