-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI to run tests on pull requests #150
base: master
Are you sure you want to change the base?
Conversation
Thanks, that's something I also have had in mind and wanted to cover in the next months. Seems you have been a bit faster. |
improved the workflow a bit, so that only the needed tox environment is run, based on the python-version to be tested. |
Thank you for the work and the time you invested. I'm new to github workflow, therefore it took me also some time to dive into the basics. As far as I understand how it works, name: Tests
on:
push:
branches:
- master
pull_request: ~
jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10]
steps:
-uses: actions/checkout@master
-name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
-name: Install dependencies
run: |
pip install --upgrade pip
pip install pytest requests
-name: run tests (pytest)
run: pytest But I have to admit, that the |
@kbr I've changed the workflow, so that |
Hi @kbr do you think we can go ahead with this? |
Have to dive into this again: because of Ukrain and PyCon DE (yes, unlucky combination) I was engaged otherwise and have to find some timeslots for OSS in the next ... |
take your time and many thanks for your efforts 🙂 |
Hi @kbr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024 calling. Maybe this can be moved forward? 🙂
|
||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
python-version: [""3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] |
- uses: actions/checkout@master | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/setup-python@v2 | |
uses: actions/setup-python@v5 |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: actions/checkout@master | |
- uses: actions/checkout@v4 |
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: actions/checkout@master | |
- uses: actions/checkout@v4 |
- uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/setup-python@v2 | |
uses: actions/setup-python@v5 |
name: Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: actions/checkout@master | |
- uses: actions/checkout@v4 |
- uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/setup-python@v2 | |
uses: actions/setup-python@v5 |
on: | ||
push: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only on the master branch?
The @v2 tells the CI to use the git object |
Maybe the actions needs to be enabled first on https://github.com/kbr/fritzconnection/settings/actions
working example: mib1185#1