Limit calculation of top_manual users to last 4 weeks #255
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: test-backends | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libpcsclite-dev | |
pip install --user pdm | |
pdm sync --prod | |
- name: Test backend sqlite | |
run: | | |
sed -i 's/^CARD.*/CARD = ""/' config.py | |
sed -i 's/^FACERECOGNITION.*/FACERECOGNITION = False/' config.py | |
sed -i 's/^PIR.*/PIR = False/' config.py | |
sed -i 's/^ILLUMINATION.*/ILLUMINATION = False/' config.py | |
sed -i 's/^DB_BACKEND.*/DB_BACKEND = "sqlite"/' config.py | |
pdm run ./bin/run.py & | |
pid=$! | |
sleep 1 | |
ps | grep -c $pid || wait $pid | |
kill -SIGTERM $pid | |
- name: Test backend postgresql | |
run: | | |
sed -i 's/^CARD.*/CARD = ""/' config.py | |
sed -i 's/^FACERECOGNITION.*/FACERECOGNITION = False/' config.py | |
sed -i 's/^PIR.*/PIR = False/' config.py | |
sed -i 's/^ILLUMINATION.*/ILLUMINATION = False/' config.py | |
sed -i 's/^DB_BACKEND.*/DB_BACKEND = "postgres"/' config.py | |
pdm run ./bin/run.py & | |
pid=$! | |
sleep 1 | |
ps | grep -c $pid || wait $pid | |
kill -SIGTERM $pid | |
- name: Test backend testing | |
run: | | |
sed -i 's/^CARD.*/CARD = ""/' config.py | |
sed -i 's/^FACERECOGNITION.*/FACERECOGNITION = False/' config.py | |
sed -i 's/^PIR.*/PIR = False/' config.py | |
sed -i 's/^ILLUMINATION.*/ILLUMINATION = False/' config.py | |
sed -i 's/^DB_BACKEND.*/DB_BACKEND = "sqlite"/' config.py | |
export FLASK_ENV=prefilled | |
export FLASK_DEBUG=true | |
pdm run ./bin/run.py & | |
pid=$! | |
sleep 1 | |
ps | grep -c $pid || wait $pid | |
kill -SIGTERM $pid |