Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/compatibility-matrix-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ jobs:
description: "Compatibility Matrix Testing for ${{ inputs.DESKTOP_VERSION }} version"
status: pending

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
continue-on-error: true
with:
persist-credentials: false
sparse-checkout: |
e2e/utils/github-actions.js
sparse-checkout-cone-mode: false

- name: Post pending e2e/linux|macos|windows
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
continue-on-error: true
env:
DESKTOP_SHA: ${{ needs.calculate-commit-hash.outputs.DESKTOP_SHA }}
CMT_MATRIX: ${{ inputs.CMT_MATRIX }}
with:
script: |
const {updateInitialOsStatuses} = require('./e2e/utils/github-actions.js');
const matrix = JSON.parse(process.env.CMT_MATRIX || '{}');
const platforms = (matrix.environment || []).map((env) => ({platform: env.os, runner: env.runner}));
await updateInitialOsStatuses({
github,
context,
sha: process.env.DESKTOP_SHA,
platforms,
});

# Input follows the below schema (Matterwick ≥ v0.4.16).
# {
# "environment": [
Expand Down Expand Up @@ -123,6 +149,32 @@ jobs:
description: "Compatibility Matrix Testing for ${{ inputs.DESKTOP_VERSION }} version"
status: failure

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
continue-on-error: true
with:
persist-credentials: false
sparse-checkout: |
e2e/utils/github-actions.js
sparse-checkout-cone-mode: false

- name: Flip e2e/linux|macos|windows from CMT job results
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
continue-on-error: true
env:
DESKTOP_SHA: ${{ needs.calculate-commit-hash.outputs.DESKTOP_SHA }}
CMT_MATRIX: ${{ inputs.CMT_MATRIX }}
with:
script: |
const {updateCmtOsStatusesFromWorkflowJobs} = require('./e2e/utils/github-actions.js');
const matrix = JSON.parse(process.env.CMT_MATRIX || '{}');
const platforms = (matrix.environment || []).map((env) => ({platform: env.os, runner: env.runner}));
await updateCmtOsStatusesFromWorkflowJobs({
github,
context,
sha: process.env.DESKTOP_SHA,
platforms,
});

# https://mattermost.atlassian.net/browse/CLD-5815
update-success-final-status:
runs-on: ubuntu-22.04
Expand All @@ -141,6 +193,32 @@ jobs:
description: "Compatibility Matrix Testing for ${{ inputs.DESKTOP_VERSION }} version"
status: success

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
continue-on-error: true
with:
persist-credentials: false
sparse-checkout: |
e2e/utils/github-actions.js
sparse-checkout-cone-mode: false

- name: Flip e2e/linux|macos|windows from CMT job results
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
continue-on-error: true
env:
DESKTOP_SHA: ${{ needs.calculate-commit-hash.outputs.DESKTOP_SHA }}
CMT_MATRIX: ${{ inputs.CMT_MATRIX }}
with:
script: |
const {updateCmtOsStatusesFromWorkflowJobs} = require('./e2e/utils/github-actions.js');
const matrix = JSON.parse(process.env.CMT_MATRIX || '{}');
const platforms = (matrix.environment || []).map((env) => ({platform: env.os, runner: env.runner}));
await updateCmtOsStatusesFromWorkflowJobs({
github,
context,
sha: process.env.DESKTOP_SHA,
platforms,
});

cleanup-cmt-instances:
runs-on: ubuntu-22.04
if: always()
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/e2e-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,36 @@ jobs:
platforms: ${{ steps.generate.outputs.platforms }}
steps:
- id: generate
env:
INSTANCE_DETAILS: ${{ inputs.instance_details }}
run: |
echo "platforms=$(echo '${{ inputs.instance_details }}' | jq -c)" >> $GITHUB_OUTPUT
# Matterwick still dispatches macos-latest; pin explicitly so the job
# does not drift when GitHub retargets that label to macOS 26.
# Normalize platform to canonical linux|macos|windows (derive from runner
# when needed) so job names and e2e/<os> statuses stay consistent.
platforms=$(echo "${INSTANCE_DETAILS}" | jq -c '
map(
(if .runner == "macos-latest" then .runner = "macos-26" else . end) |
. as $row |
($row.platform // $row.os // "") as $raw |
(
if $raw == "linux" or $raw == "macos" or $raw == "windows" then $raw
elif (($row.runner // "") | test("^(ubuntu|linux)")) then "linux"
elif (($row.runner // "") | test("^(macos|darwin)")) then "macos"
elif (($row.runner // "") | test("^windows")) then "windows"
else null
end
) as $canon |
if $canon == null then empty
else ($row | .platform = $canon | del(.os))
end
)
')
if [ "$(echo "${platforms}" | jq 'length')" -eq 0 ]; then
echo "No supported platforms in instance_details (need linux|macos|windows)" >&2
exit 1
fi
echo "platforms=${platforms}" >> "$GITHUB_OUTPUT"

update-initial-status:
name: Update initial status
Expand Down
Loading
Loading