Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Update and rename code_test.yml to python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Dec 16, 2022
1 parent 813fcb3 commit d1c274b
Showing 1 changed file with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,34 @@ name: Python Package

on:
push:
branches: [ "master" ]
branches: [ master ]
pull_request:
branches: [ "master" ]
branches: [ master ]

jobs:
build:

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

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f /requirements/pip-requirements.txt ]; then pip install -r /requirements/pip-requirements.txt; fi
pip install pipenv
pipenv install
pipenv install flake8 pytest
if [ -f /requirements/pip-requirements.txt ]; then pip install -r /requirements/pip-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
pipenv run 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=127 --statistics
pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
pipenv run pytest

0 comments on commit d1c274b

Please sign in to comment.