Skip to content

Commit

Permalink
Add CI caching for python environments (#23)
Browse files Browse the repository at this point in the history
* Added first pytest script for protein class and a script for performing local tests.

* Added pytest in CI

* Forgot -r for file

* Version of pytest with pytest at end of pipeline

* New pytest CI where pip installs local package

* Fixed tabs and added caching of python/pip environment

* Removed dot and added removal of build dirs to manage clean command

* Added cache ignores for env setup and ids for the caches

* Fixed cache IDs

* Renamed cache because GitHub does not allow for clearing caches...

* Moved python setup to be before cache loading

* Run that will install the dependencies

* Uncommented the cache-hit detection for installing dependencies

* Updated pre-commit version in hope that runner will create new cache

* Added more tests and added flake8 incompatability

* Other flake8 config try

* Reset to .flake8 file

* Downgrade of pre-commit to force dep. installation in CI

* Different pre-commit version

* Added depth_first tests

* Added depth_first_bnb tests

* Push to try and install all dependencies correctly

* Added back cache check for installing dependencies. New way of calling flake8, added class dependencies on tests

* Removed ls

* Core change test

* Core change test - new correctly

* Core archiving works

* Fixed pytest ordering and upgraded pandas version to trigger new cache

* Upgraded pandas

* Changed pandas version to 1.1.0

* Dependency check

* new flake8 installation

* Flake8 action

* Added pip update flag

* Cleaned up the flake8 action usage

* Trying to install new deps

* Removed caching, only using dependencies during pytest
  • Loading branch information
okkevaneck authored Apr 30, 2021
1 parent 91dd2de commit 4e14d09
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,21 @@ jobs:
syntax_check:
name: Check for syntax errors
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Flake8 - Error on syntax errors or undefined names
uses: py-actions/flake8@v1.1.0
with:
python-version: ${{ matrix.python-version }}
args: --count --select=E9,F63,F7,F82 --show-source --statistics
update-pip: "true"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- 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=127 --statistics
- name: Flake8 - Warn on everything else
uses: py-actions/flake8@v1.1.0
with:
args: --count --exit-zero --max-complexity=10 --statistics
max-line-length: 127
update-pip: "true"

pytest:
name: Pytest
Expand All @@ -71,7 +63,6 @@ jobs:
- name: Test with pytest
run: pytest


build_wheels:
name: Build wheels
needs: [pytest, matrix_prep]
Expand Down

0 comments on commit 4e14d09

Please sign in to comment.