Skip to content

Commit

Permalink
CICD pytest updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterXY89 committed Dec 10, 2023
1 parent 7ec5fda commit 1fb834a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Package Using Anaconda
name: ChatDoc CI

on: [push]

Expand All @@ -17,17 +17,19 @@ jobs:
- name: Install dependencies
run: |
conda env update --file environment.yml --name adl
echo "source activate $(head -1 environment.yml | cut -d' ' -f2)" >> $BASH_ENV
source $BASH_ENV
- name: Lint with flake8
run: |
conda install flake8
# Lint using flake8 with settings from .flake8 file
$CONDA/bin/flake8 --config .flake8
flake8 --config .flake8
- name: Test with pytest
run: |
conda install pytest
$CONDA/bin/pytest
pytest
env:
CACHE_NUMBER: 0 #
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ __pycache__/

.DS_Store
*/.DS_Store

data/
4 changes: 4 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

def _delete_existing_data():
data_dir = os.path.join(os.getcwd(), "data")
if not os.path.exists(data_dir):
os.makedirs(data_dir)

print("Created data directory")
for file in os.listdir(data_dir):
os.remove(os.path.join(data_dir, file))
print("Deleted existing data")
Expand Down

0 comments on commit 1fb834a

Please sign in to comment.