Update component imports to use relative paths #143
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: Python Tests | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DJANGO_SETTINGS_MODULE: "cronyGlasses.settings.dev" | |
DJANGO_SECRET_KEY: "thisisnotasecret" | |
PAYPAL_RECEIVER_EMAIL: secrets.PAYPAL_RECEIVER_EMAIL | |
USE_SQLITE: True | |
ALLOWED_HOSTS: "127.0.0.1 localhost" | |
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.8] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: update-system-dependencies | |
run: | | |
sudo apt-get update -y | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10.8 | |
cache: "pip" | |
- name: Set up virtual environment | |
run: python -m venv venv | |
- name: Activate virtual environment | |
run: source venv/bin/activate | |
- name: Install dependencies | |
run: pip install wheel && pip install -r backend/requirements.txt | |
- name: Run migrations | |
run: python backend/manage.py migrate --noinput | |
- name: Run tests | |
run: python backend/manage.py test | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' | |
run: | | |
curl $deploy_url |