-
Notifications
You must be signed in to change notification settings - Fork 62
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?
Changes from all commits
3f9bafe
6f41c82
9ae3fa8
cdaddca
d2adf85
35ede83
7adbb7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,68 @@ | ||||||
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"] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
steps: | ||||||
- uses: actions/checkout@master | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- 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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
with: | ||||||
python-version: ${{ matrix.python-version }} | ||||||
|
||||||
- name: Install dependencies | ||||||
run: pip install pytest requests | ||||||
|
||||||
- name: Tests | ||||||
run: pytest | ||||||
|
||||||
docs: | ||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- name: Set up Python 3.10 | ||||||
uses: actions/setup-python@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
with: | ||||||
python-version: "3.10" | ||||||
|
||||||
- name: Install dependencies | ||||||
run: | | ||||||
pip install sphinx sphinx_rtd_theme | ||||||
pip install . | ||||||
|
||||||
- name: Build docs | ||||||
run: | | ||||||
cd docs | ||||||
sphinx-build -qb html -d /tmp/doctrees . /tmp/html | ||||||
|
||||||
coverage: | ||||||
name: Coverage | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@master | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- name: Set up Python 3.10 | ||||||
uses: actions/setup-python@v2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
with: | ||||||
python-version: "3.10" | ||||||
|
||||||
- name: Install dependencies | ||||||
run: pip install pytest pytest-cov coveralls | ||||||
|
||||||
- name: Test | ||||||
run: pytest -qq --cov=fritzconnection --cov-report=term-missing |
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?