-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Issue #508: Add templates for static and functional tests * Issue #508: Fix file name * Fallback to build:dev * Update README * Set concurrency
- Loading branch information
Showing
4 changed files
with
126 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
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,56 @@ | ||
name: "Functional Tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Functional-Tests: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ github.workspace }}/.ddev/.drainpipe-composer-cache | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: ./.github/actions/drainpipe/set-env | ||
|
||
- name: Install and Start DDEV | ||
uses: ./.github/actions/drainpipe/ddev | ||
with: | ||
git-name: Drainpipe Bot | ||
git-email: [email protected] | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | ||
|
||
- name: Build Project | ||
run: | | ||
ddev composer install | ||
if ddev task --list | grep -q "build:ci:functional"; then | ||
ddev task build:ci:functional | ||
elif ddev task --list | grep -q "build:dev"; then | ||
ddev task build:dev | ||
else | ||
ddev task build | ||
fi | ||
- name: Run Functional Tests | ||
run: ddev task test:functional | ||
|
||
- name: Upload test artifacts | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_result | ||
path: test_result |
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,43 @@ | ||
name: "Static Tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Static-Tests: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ github.workspace }}/.ddev/.drainpipe-composer-cache | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: ./.github/actions/drainpipe/set-env | ||
|
||
- name: Install and Start DDEV | ||
uses: ./.github/actions/drainpipe/ddev | ||
|
||
- name: Install Project | ||
run: ddev composer install | ||
|
||
- name: Run Static Tests | ||
run: ddev task test:static | ||
|
||
- name: Upload test artifacts | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_result | ||
path: test_result |
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