Skip to content

Instantly share code, notes, and snippets.

@twyle
Last active May 30, 2022 16:52
Show Gist options
  • Save twyle/971ea10642fb026efb077f933340ce98 to your computer and use it in GitHub Desktop.
Save twyle/971ea10642fb026efb077f933340ce98 to your computer and use it in GitHub Desktop.
name: Feature Development Build
on:
push:
branches-ignore: [development, staging, production, release]
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
environment:
name: Development
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
touch .env
echo FLASK_APP=${{secrets.FLASK_APP}} >> .env
echo FLASK_ENV=${{secrets.FLASK_ENV}} >> .env
echo CLIENT_ID=${{secrets.CLIENT_ID}} >> .env
echo CLIENT_SECRET=${{secrets.CLIENT_SECRET}} >> .env
if [ -d tests ] || [ -d test ]; then python -m pytest; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment