-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add small gh action helper verifyProjectConfig.yaml
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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 |