Skip to content

Commit

Permalink
set up actions for building basic package
Browse files Browse the repository at this point in the history
  • Loading branch information
n-wbrown committed Oct 15, 2023
1 parent 1e53929 commit c1aea7f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,27 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- 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
pip install cookiecutter
- name: Build sample package
run: |
python -m cookiecutter ./ --no-input
- 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
flake8 ./project_name --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
- name: Test with pytest
flake8 ./project_name --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Attempt installation
run: |
cd ./project_name
pip install -e .
- name: Show package
run: |
pytest
tree ./project_name

0 comments on commit c1aea7f

Please sign in to comment.