Create READ_ME.md #542
Workflow file for this run
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
name: EZID CI | |
on: push | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
IS_CI: 1 | |
DJANGO_SETTINGS_MODULE: settings.tests | |
PYTHONPATH: ${{ github.workspace }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- name: Start MySQL service | |
run: | | |
sudo /etc/init.d/mysql start | |
- name: Install packaged deps | |
run: | | |
sudo apt-get install --yes libdb5.3-dev | |
- name: Prepare Python env | |
run: | | |
pip install --upgrade pip setuptools wheel | |
pip install -r ./requirements-dev.txt | |
- name: Dump environment (for troubleshooting) | |
run: | | |
printf 'PYTHONPATH: %s\n' "$PYTHONPATH" | |
# apt-cache pkgnames | sort | |
# find / | grep /bin/ | sort | |
# pip freeze | |
# pip check || true | |
# python --version | |
echo "CWD=${PWD}" | |
ls -l | |
# mysql -e ' | |
# use ezid_test_db; | |
# show tables; | |
# select prefix, minter from ezidapp_shoulder; | |
# ' | |
- name: Prepare DB | |
run: | | |
mysql -h127.0.0.1 -uroot -proot << EOF | |
drop database if exists ezid_test_db; | |
create database ezid_test_db; | |
use ezid_test_db; | |
drop user if exists 'ezid_test_user'@'%'; | |
create user 'ezid_test_user'@'%' identified by 'ezid_test_pw'; | |
grant all privileges on ezid_test_db.* to 'ezid_test_user'@'%'; | |
flush privileges; | |
EOF | |
- name: Prepare filesystem | |
run: | | |
mkdir -p ../download/public ../logs | |
- name: Setup DB and static files | |
run: | | |
# ./manage.py makemigrations --merge --no-input | |
# ./manage.py makemigrations ezidapp | |
./manage.py migrate | |
./manage.py collectstatic --no-input | |
- name: Load DB fixture | |
run: | | |
# ./manage.py loaddata --ignorenonexistent db | |
./manage.py loaddata db | |
#./manage.py diag-update-admin | |
- name: Run tests | |
env: | |
PYTHONPATH: ${{ github.workspace }} | |
run: | | |
pytest --maxfail 10 | |
# - pip install -e . |