-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create Github workflow test.yml * add tests for job models and bitmap check with in-memory sqlite db * update settings IMPRESSO_SOLR_FIELDS and add IMPRESSO_SOLR_FIELDS _AS_LIST. Change django command accordingly * move Solr helpers function to specific `imrpesso.utils.solr` module * use dotenv lib to retrieve variables * lint with black and add documentation to Profile Model * Update tasks.py * upgrade to django 5.1.3 * improve admin for user bitmaps * finalize export csv * update progress method to send a more structured message --------- Co-authored-by: Daniele Guido <[email protected]>
- Loading branch information
1 parent
17245e1
commit f876ac1
Showing
26 changed files
with
1,252 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: ['develop'] | ||
pull_request: | ||
branches: ['develop'] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12.4' | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install dependencies | ||
run: pipenv install --dev | ||
|
||
- name: Add a .env file | ||
run: | | ||
echo "SECRET_KEY=ThisisaVeryverysecretkey" >> .env | ||
echo "DEBUG=True" >> .env | ||
echo "ALLOWED_HOSTS=localhost" >> .env | ||
echo "CSRF_TRUSTED_ORIGINS=http://localhost" >> .env | ||
echo "IMPRESSO_DB_ENGINE=mysal" >> .env | ||
echo "IMPRESSO_DB_NAME=xxxxxxxxxxxxxxxxxx" >> .env | ||
echo "IMPRESSO_DB_USER=xxxxxxxxxxxxxxxxxx" >> .env | ||
echo "IMPRESSO_DB_PASSWORD=xxxxxxxxxxxxxx" >> .env | ||
echo "IMPRESSO_DB_HOST=localhost" >> .env | ||
echo "IMPRESSO_DB_PORT=0000" >> .env | ||
echo "IMPRESSO_SOLR_URL=http://localhost:8983/solr" >> .env | ||
echo "IMPRESSO_SOLR_PASSAGES_URL=http://localhost:8983/solr/passages" >> .env | ||
echo "IMPRESSO_SOLR_USER=ssssssssssssssss" >> .env | ||
echo "IMPRESSO_SOLR_USER_WRITE=ssssssssss" >> .env | ||
echo "IMPRESSO_SOLR_PASSWORD=ssssssssssss" >> .env | ||
echo "IMPRESSO_SOLR_PASSWORD_WRITE=ssssss" >> .env | ||
- name: Set up debug logging, this requires a secific debug folder | ||
run: | | ||
mkdir -p logs | ||
touch logs/debug.log | ||
- name: Run Django tests | ||
run: pipenv run ./manage.py test | ||
env: | ||
DJANGO_SETTINGS_MODULE: impresso.settings # replace with your actual settings module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.