Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f5f4759
Update Playwright to v1.58.2 across modules
rafal-k Mar 24, 2026
b6f67e2
Add E2E test infrastructure for payments-example-gateway
rafal-k Mar 24, 2026
37b77af
Add payments-example-gateway to E2E CI workflow
rafal-k Mar 24, 2026
f0eb528
Remove pull_request trigger to eliminate duplicate test runs
rafal-k Mar 24, 2026
54c81f7
Fix E2E workflow to prevent unnecessary test runs
rafal-k Mar 24, 2026
1d98ead
Fix "array only strings can be parsed" error in the detect-changes job.
rafal-k Mar 24, 2026
47c9dbe
Fix path filter to compare only commits in current push
rafal-k Mar 24, 2026
44519a5
Apply the same three fixes from test-e2e workflow to lint workflow
rafal-k Mar 24, 2026
e9c2215
Add conclusion jobs to both test-e2e.yml and lint.yml workflows to
rafal-k Mar 24, 2026
f4e1daf
Add workflow_dispatch inputs to both test-e2e.yml and lint.yml to
rafal-k Mar 24, 2026
806b31c
Fix two issues with manual workflow triggers:
rafal-k Mar 24, 2026
b836797
Support directory names in manual trigger module input
rafal-k Mar 24, 2026
4c7990d
Fix payments-example-gateway deploy script for CI
rafal-k Mar 24, 2026
7256299
Create seed.sh script for payments-example-gateway CI deployment
rafal-k Mar 25, 2026
497a9a0
Separate test setup and deployment for payments-example-gateway
rafal-k Mar 25, 2026
dc78a8a
Debug authentication issue in payments-example-gateway seed script
rafal-k Mar 25, 2026
2b8880d
Modified seed.sh to create a .pos file when running in CI
rafal-k Mar 25, 2026
71cc11b
Debugging problems with authorization during pos-cli deploy
rafal-k Mar 25, 2026
fab8240
Remove unnecessary change of directories pre calling pos-cli deploy
rafal-k Mar 25, 2026
33e31d4
Change debugging approach
rafal-k Mar 25, 2026
8e605e9
Set node v22 and install the newest pos-cli
rafal-k Mar 25, 2026
dd8c4d4
Don't install pos-cli, use the one in the container; use node v20
rafal-k Mar 26, 2026
f182261
Troubleshoot payments-example-gateway CI deployment authentication
rafal-k Mar 26, 2026
da80fbd
Use exact same commands to deploy module as in platformos-community, …
rafal-k Mar 26, 2026
b27d493
Add debug checks for .pos files in CI workflow
rafal-k Mar 26, 2026
ae1a2bf
Use get-token from test branch to debug token issue
rafal-k Mar 26, 2026
4bd4684
Remove all debugging changes from the test workflow
rafal-k Mar 26, 2026
fad7e9c
Add a missing Playwright config file to pos-module-payments-example-g…
rafal-k Mar 26, 2026
f30bd25
Remove icons from payments-example-gateway test files
rafal-k Mar 26, 2026
6663c6e
Mark delayed payment test as fixme due to module bug
rafal-k Mar 26, 2026
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
77 changes: 69 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Lint modules

on:
pull_request:
branches: [ master ]
paths-ignore:
- "**/README.md"
push:
paths-ignore:
- "**/README.md"
workflow_dispatch:
inputs:
modules:
description: 'Modules to lint (comma-separated or "all" for all modules)'
required: false
default: 'all'
type: string

jobs:
pre_job:
Expand All @@ -21,7 +23,7 @@ jobs:
with:
github_token: ${{ github.token }}
paths_ignore: '["**/README.md"]'
do_not_skip: '["push"]'
do_not_skip: '["push", "workflow_dispatch"]'

detect-changes:
needs: pre_job
Expand All @@ -34,7 +36,10 @@ jobs:

- uses: dorny/paths-filter@v3
id: filter
if: github.event_name != 'workflow_dispatch'
with:
base: ${{ github.event.before }}
ref: ${{ github.event.after }}
filters: |
payments:
- 'pos-module-payments/**'
Expand Down Expand Up @@ -68,11 +73,29 @@ jobs:
- name: Set matrix for changed modules
id: set-matrix
run: |
# Extract module names where filter output is "true"
modules=$(echo '${{ toJSON(steps.filter.outputs) }}' | jq -c '[to_entries[] | select(.value == "true") | .key]')
# Check if this is a manual trigger
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Manual trigger detected"
manual_input="${{ github.event.inputs.modules }}"
echo "Manual input: $manual_input"

if [ "$manual_input" = "all" ] || [ -z "$manual_input" ]; then
# Lint all modules
modules='["payments","user","chat","common-styling","tests","core","oauth-facebook","oauth-github","oauth-google","openai","reports","data-export-api","payments-stripe","payments-example-gateway"]'
else
# Parse comma-separated list, strip pos-module- prefix, and create array
modules=$(echo "$manual_input" | jq -R 'split(",") | map(gsub("^\\s+|\\s+$"; "") | gsub("^pos-module-"; ""))')
fi
echo "Manual trigger modules: $modules"
else
# Automatic detection from git changes
changes='${{ steps.filter.outputs.changes }}'
echo "Detected changes: $changes"
modules="$changes"
echo "Changed modules for linting: $modules"
fi

echo "matrix=$modules" >> $GITHUB_OUTPUT
echo "Changed modules for linting: $modules"

lint-platformos-check:
needs: detect-changes
Expand Down Expand Up @@ -168,3 +191,41 @@ jobs:
run: |
echo "platformos-check failed — marking job as failed"
exit 1

conclusion:
needs: [detect-changes, lint-platformos-check]
if: always()
runs-on: ubuntu-latest
steps:
- name: Generate workflow summary
run: |
if [ "${{ needs.detect-changes.outputs.changed-modules }}" = "[]" ] || [ "${{ needs.detect-changes.result }}" = "skipped" ]; then
echo "## Linting - Skipped" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.detect-changes.result }}" = "skipped" ]; then
echo "Workflow was skipped by duplicate action check." >> $GITHUB_STEP_SUMMARY
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Manual trigger with no matching modules selected." >> $GITHUB_STEP_SUMMARY
else
echo "No modules were changed in this push." >> $GITHUB_STEP_SUMMARY
fi
else
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "## Linting - Completed (Manual Trigger)" >> $GITHUB_STEP_SUMMARY
else
echo "## Linting - Completed" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "Linting ran for the following modules:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '${{ needs.detect-changes.outputs.changed-modules }}' | jq -r '.[] | "- " + .' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.lint-platformos-check.result }}" = "success" ]; then
echo "Result: All checks passed" >> $GITHUB_STEP_SUMMARY
elif [ "${{ needs.lint-platformos-check.result }}" = "skipped" ]; then
echo "Result: Linting was skipped" >> $GITHUB_STEP_SUMMARY
else
echo "Result: Some checks failed - see job output for details" >> $GITHUB_STEP_SUMMARY
fi
fi
93 changes: 83 additions & 10 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: E2E tests
on:
pull_request:
branches: [ master ]
paths-ignore:
- "**/README.md"
push:
paths-ignore:
- "**/README.md"
workflow_dispatch:
inputs:
modules:
description: 'Modules to test (comma-separated: user, chat, common-styling, payments-example-gateway, or "all")'
required: false
default: 'all'
type: string

jobs:
pre_job:
Expand All @@ -20,7 +22,7 @@ jobs:
with:
github_token: ${{ github.token }}
paths_ignore: '["**/README.md"]'
do_not_skip: '["push"]'
do_not_skip: '["push", "workflow_dispatch"]'

detect-changes:
needs: pre_job
Expand All @@ -33,14 +35,19 @@ jobs:

- uses: dorny/paths-filter@v3
id: filter
if: github.event_name != 'workflow_dispatch'
with:
base: ${{ github.event.before }}
ref: ${{ github.event.after }}
filters: |
user:
- 'pos-module-user/**'
chat:
- 'pos-module-chat/**'
common-styling:
- 'pos-module-common-styling/**'
payments-example-gateway:
- 'pos-module-payments-example-gateway/**'

- name: Set matrix for changed modules
id: set-matrix
Expand All @@ -65,17 +72,45 @@ jobs:
"path": "pos-module-common-styling",
"deploy-script": "pos-cli data clean --include-schema --auto-confirm\npos-cli deploy",
"test-commands": "npm run pw-tests"
},
"payments-example-gateway": {
"module": "payments-example-gateway",
"path": "pos-module-payments-example-gateway",
"deploy-script": "npm run test:setup:local\n./tests/data/seed/seed.sh",
"test-commands": "npm run pw-tests"
}
}
EOF

# Extract changed modules and map to their configurations
modules=$(echo '${{ toJSON(steps.filter.outputs) }}' | \
jq -c --slurpfile config /tmp/module-config.json \
'[to_entries[] | select(.value == "true") | .key as $m | $config[0][$m] | select(. != null)]')
# Check if this is a manual trigger
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Manual trigger detected"
manual_input="${{ github.event.inputs.modules }}"
echo "Manual input: $manual_input"

if [ "$manual_input" = "all" ] || [ -z "$manual_input" ]; then
# Test all modules
modules=$(jq -c '[.user, .chat, ."common-styling", ."payments-example-gateway"]' /tmp/module-config.json)
else
# Parse comma-separated list, strip pos-module- prefix, and map to configurations
modules=$(echo "$manual_input" | \
jq -R 'split(",") | map(gsub("^\\s+|\\s+$"; "") | gsub("^pos-module-"; ""))' | \
jq -c --slurpfile config /tmp/module-config.json \
'map(. as $m | $config[0][$m] | select(. != null))')
fi
echo "Manual trigger modules: $modules"
else
# Automatic detection from git changes
changes='${{ steps.filter.outputs.changes }}'
echo "Detected changes: $changes"

# Extract changed modules and map to their configurations
modules=$(jq -nc --argjson changes "$changes" --slurpfile config /tmp/module-config.json \
'$changes | map(. as $m | $config[0][$m] | select(. != null))')
echo "Changed modules matrix: $modules"
fi

echo "matrix=$modules" >> $GITHUB_OUTPUT
echo "Changed modules matrix: $modules"

test-e2e:
needs: detect-changes
Expand Down Expand Up @@ -148,3 +183,41 @@ jobs:
method: release
repository-url: ${{ vars.CI_PS_REPOSITORY_URL }}
pos-ci-repo-token: ${{ secrets.POS_CI_PS_REPO_ACCESS_TOKEN }}

conclusion:
needs: [detect-changes, test-e2e]
if: always()
runs-on: ubuntu-latest
steps:
- name: Generate workflow summary
run: |
if [ "${{ needs.detect-changes.outputs.changed-modules }}" = "[]" ] || [ "${{ needs.detect-changes.result }}" = "skipped" ]; then
echo "## E2E Tests - Skipped" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.detect-changes.result }}" = "skipped" ]; then
echo "Workflow was skipped by duplicate action check." >> $GITHUB_STEP_SUMMARY
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Manual trigger with no matching modules selected." >> $GITHUB_STEP_SUMMARY
else
echo "No modules with E2E tests were changed in this push." >> $GITHUB_STEP_SUMMARY
fi
else
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "## E2E Tests - Completed (Manual Trigger)" >> $GITHUB_STEP_SUMMARY
else
echo "## E2E Tests - Completed" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "Tests ran for the following modules:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '${{ needs.detect-changes.outputs.changed-modules }}' | jq -r '.[] | "- " + .module' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.test-e2e.result }}" = "success" ]; then
echo "Result: All tests passed" >> $GITHUB_STEP_SUMMARY
elif [ "${{ needs.test-e2e.result }}" = "skipped" ]; then
echo "Result: Tests were skipped" >> $GITHUB_STEP_SUMMARY
else
echo "Result: Some tests failed - check job output for details" >> $GITHUB_STEP_SUMMARY
fi
fi
28 changes: 16 additions & 12 deletions pos-module-chat/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pos-module-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"install: playwright": "npx playwright install"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@playwright/test": "^1.58.2",
"@types/node": "^22.10.6"
}
}
Loading
Loading