Last active
April 24, 2020 18:27
-
-
Save pjhoberman/8333df201176bfc00e506ed7d8b4977a to your computer and use it in GitHub Desktop.
This file contains hidden or 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: Django CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.6, 3.7, 3.8] | |
services: | |
postgres: | |
image: postgres:10.8 | |
env: | |
POSTGRES_USER: ${{ secrets.DB_USER }} | |
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
POSTGRES_DB: ${{ secrets.DB_NAME }} | |
ports: ['5432:5432'] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
env: | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
DB_USER: ${{ secrets.DB_USER }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | |
CAPTCHA_SITE_KEY: ${{ secrets.CAPTCHA_SITE_KEY }} | |
CAPTCHA_SECRET_KEY: ${{ secrets.CAPTCHA_SECRET_KEY }} | |
MEMCACHEDCLOUD_SERVERS: ${{ secrets.MEMCACHEDCLOUD_SERVERS }} | |
MEMCACHEDCLOUD_USERNAME: ${{ secrets.MEMCACHEDCLOUD_USERNAME }} | |
MEMCACHEDCLOUD_PASSWORD: ${{ secrets.MEMCACHEDCLOUD_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: GitHub Action for Flake8 | |
uses: cclauss/[email protected] | |
- name: Run migrations | |
run: python manage.py migrate | |
- name: Run Tests | |
run: | | |
python manage.py test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment