-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split feature testing into separate jobs
- Loading branch information
Showing
4 changed files
with
208 additions
and
180 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,62 @@ | ||
name: Test Features (Autogenerated) | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
autogenerated: | ||
name: '${{ matrix.feature }} against ${{ matrix.baseImage }}' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
baseImage: | ||
- debian:latest | ||
- debian:bookworm-slim | ||
- ubuntu:noble | ||
- mcr.microsoft.com/devcontainers/base:ubuntu | ||
- mcr.microsoft.com/devcontainers/base:debian | ||
- mcr.microsoft.com/devcontainers/base:alpine | ||
feature: | ||
- base | ||
- cron | ||
- cron-control-runner | ||
- desktop-lite | ||
- dev-tools | ||
- elasticsearch | ||
- entrypoints | ||
- php | ||
- mailpit | ||
- mariadb | ||
- mc | ||
- memcached | ||
- nginx | ||
- ssh | ||
- su-exec | ||
- vip-cli | ||
- vip-go-mu-plugins | ||
- wp-cli | ||
- wptl | ||
exclude: | ||
- feature: desktop-lite | ||
baseImage: mcr.microsoft.com/devcontainers/base:alpine | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Install @devcontainers/cli | ||
run: npm install -g @devcontainers/cli | ||
|
||
- name: "Run tests for '${{ matrix.feature }}' against '${{ matrix.baseImage }}'" | ||
run: devcontainer features test -p features --skip-scenarios -f ${{ matrix.feature }} -i ${{ matrix.baseImage }} |
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: Test Features (Global Scenarios) | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
global: | ||
name: '${{ matrix.test }}' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- php81-alpine-base | ||
- php82-alpine-base | ||
- php83-alpine-base | ||
- php81-ubuntu-base | ||
- php82-ubuntu-base | ||
- php83-ubuntu-base | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Install @devcontainers/cli | ||
run: npm install -g @devcontainers/cli | ||
|
||
- name: Expose GitHub Runtime | ||
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0 | ||
|
||
- name: Build images | ||
run: | | ||
REPO="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" | ||
IMAGE= | ||
if [ "${{ contains(matrix.test, 'alpine') }}" = "true" ]; then | ||
IMAGE=alpine-base | ||
elif [ "${{ contains(matrix.test, 'ubuntu') }}" = "true" ]; then | ||
IMAGE=ubuntu-base | ||
fi | ||
devcontainer build \ | ||
--workspace-folder "images/src/${IMAGE}" \ | ||
--image-name="ghcr.io/${REPO}/${IMAGE}:latest" \ | ||
--cache-from type=gha | ||
- name: Run tests | ||
run: devcontainer features test -p features --global-scenarios-only --filter "${{ matrix.test }}" |
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,90 @@ | ||
name: Test Features | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
scenarios: | ||
name: '${{ matrix.test.feature }} ${{ matrix.test.filter }}' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- feature: cron | ||
- feature: cron-control-runner | ||
- feature: desktop-lite | ||
- feature: elasticsearch | ||
filter: alpine-base-persist | ||
- feature: elasticsearch | ||
filter: alpine-base-nopersist | ||
- feature: elasticsearch | ||
filter: ubuntu-base-persist | ||
- feature: elasticsearch | ||
filter: ubuntu-base-nopersist | ||
- feature: elasticsearch | ||
filter: es-7-mcr | ||
- feature: elasticsearch | ||
filter: es-8-mcr | ||
- feature: mailpit | ||
- feature: memcached | ||
- feature: mariadb | ||
- feature: nginx | ||
- feature: photon | ||
- feature: php | ||
filter: '81' | ||
- feature: php | ||
filter: '82' | ||
- feature: php | ||
filter: '83' | ||
- feature: phpmyadmin | ||
- feature: playwright | ||
- feature: ssh | ||
- feature: xdebug | ||
- feature: wordpress | ||
- feature: wptl | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Install @devcontainers/cli | ||
run: npm install -g @devcontainers/cli | ||
|
||
- name: Expose GitHub Runtime | ||
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0 | ||
|
||
- name: Build images | ||
run: | | ||
REPO="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" | ||
for image in alpine-base ubuntu-base; do | ||
devcontainer build \ | ||
--workspace-folder images/src/${image} \ | ||
--image-name="ghcr.io/${REPO}/${image}:latest" \ | ||
--cache-from type=gha | ||
done | ||
- name: Download Elasticsearch | ||
run: | | ||
wget https://artifacts-no-kpi.elastic.co/downloads/elasticsearch/elasticsearch-7.17.23-linux-x86_64.tar.gz | ||
wget https://artifacts-no-kpi.elastic.co/downloads/elasticsearch/elasticsearch-8.15.0-linux-x86_64.tar.gz | ||
working-directory: features/src/elasticsearch | ||
if: matrix.test.feature == 'elasticsearch' | ||
|
||
- name: Run tests | ||
run: | | ||
if [ -z "${{ matrix.test.filter }}" ]; then | ||
devcontainer features test -p features --skip-autogenerated --skip-duplicated -f "${{ matrix.test.feature }}" | ||
else | ||
devcontainer features test -p features --skip-autogenerated --skip-duplicated -f "${{ matrix.test.feature }}" --filter "${{ matrix.test.filter }}" | ||
fi |
This file was deleted.
Oops, something went wrong.