feat: add small gh action helper verifyProjectConfig.yaml #1
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
# 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 |