Skip to content

Commit

Permalink
feat: add small gh action helper verifyProjectConfig.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mandrasch authored Apr 28, 2024
1 parent 1f26105 commit 67ad10e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/verifyProjectConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Small helper: Verify that craft project config is always valid by checking
# the install and apply CLI commands automatically after pushes to this repo

on:
push:
branches: [development, main]
# Energy saving: Don't trigger this for updated README file only
paths-ignore:
- '**/README.md'
pull_request:
branches: [development, main]
paths-ignore:
- '**/README.md'

name: verifyProjectConfig
jobs:
verifyProjectConfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Install DDEV via https://github.com/ddev/github-action-setup-ddev
- uses: ddev/github-action-setup-ddev@v1

# Output installed ddev version
- run: ddev -v

# Start the DDEV project, this will copy .env.example to .env
# and insert correct db connection settings for DDEV automagically
- run: ddev start

# Install dependencies
- run: ddev composer install
- run: ddev npm install

# Verify that craft installation works with dummy values
- run: ddev craft install/craft --interactive=0 --username=admin456 --password=NewPassword123 [email protected] --site-name=GitHubTest

# Verify apply CLI commands works correctly as well
- run: ddev craft project-config/diff
- run: ddev craft project-config/apply

0 comments on commit 67ad10e

Please sign in to comment.