Application upgrade to SQLAlchemy, Pytest #125
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: Run pytest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: 7 | |
- name: Build Docker image | |
run: docker build -t glider-dac-build . | |
- name: Install testing requirements and run tests | |
# FIXME: Why is it necessary to set FLASK_ENV to TESTING here when | |
# pytest runs off GHA usually set this properly? | |
run: > | |
docker run --network host -e FLASK_ENV=TESTING | |
-e OVERRIDE_REDIS_HOST=localhost -e OVERRIDE_REDIS_URL=redis://localhost:6379/8 | |
--rm -u root glider-dac-build bash -c | |
"pip install --no-cache -r /glider-dac/test_requirements.txt && | |
pytest /glider-dac/glider_dac/tests" |