security changes #108
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: 'Install, lint, test & build' | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install setuptools | |
run: python3 -m pip install setuptools | |
- name: Linting | |
run: bash bin/cleanup_pre_commit.sh | |
- name: Build Docker image | |
run: docker compose -f docker-compose.local.yml build | |
- name: Create Docker network | |
run: docker network create zwd_network | |
- name: Start images | |
run: docker compose -f docker-compose.local.yml -f docker-compose.override.yml up -d | |
- name: Run Tests | |
run: docker compose exec -T zwd-backend python manage.py test /app/apps | |
- if: ${{ failure() }} | |
name: "ON FAILURE: Which containers were running while failing?" | |
run: docker ps -a | |
- if: ${{ failure() }} | |
name: "ON FAILURE: Backend logs" | |
run: docker logs zwd-backend-zwd-backend-1 |