Skip to content
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

adding pytest workflow #65

Merged
merged 2 commits into from
Oct 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/add_labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.comment.body, '/add-labels') }}
with:
labels: |
ready-for-review
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 9 * * 5'
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/python-app.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/run-pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
- name: Test with pytest
run: |
pytest