Add funtional tests (not working atm) #11
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: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] | ||
function-tests: | ||
- name: start app | ||
run: | | ||
set -x | ||
cd expenses-server | ||
./scripts/start_devdb.sh | ||
# fake accoutns config | ||
mkdir -p ../home-lab-secrets/home_automation/expenses/ | ||
echo "accounts-config: {'accounts': []}" > ../home-lab-secrets/home_automation/expenses/application-accounts.yml | ||
./scripts/start_dev.sh notail | ||
- name: run tests | ||
run: | | ||
source tests-venv/bin/activate | ||
cd expenses-server | ||
bats_core_pkg --verbose-run --trace api-tests/ |