Skip to content

PI-264 Add Github Action to test Django scaffold on PRs #802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: test-scaffold-updates

on:
pull_request:
branches:
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install Cookiecutter
run: pip install cookiecutter

- name: Install Pipenv
run: |
python -m pip install --upgrade pip
pip install pipenv

- name: Scaffold a new project with Cookiecutter
run: |
pipenv run cookiecutter https://github.com/crowdbotics/django-scaffold \
--checkout ${{ github.head_ref }} \
--no-input --output-dir tmp_cookiecutter_output \
project_name="Test project" \
project_generated_name="test-project" \

- name: Install Scaffold dependencies
working-directory: tmp_cookiecutter_output/testproject
run: |
pipenv install

- name: Run Scaffold tests
working-directory: tmp_cookiecutter_output/testproject
env:
SECRET_KEY: "thisisasimplekey"
run: |
pipenv run python manage.py migrate
pipenv run python manage.py test
Loading