mirror of
https://github.com/mattermost/mattermost.git
synced 2026-04-13 21:17:49 -04:00
|
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* add GH action to save mmctl e2e test report to zephyr * test on pr * bundle dependencies and set conditonal run on local and GH * ensure test keys are saved * improve github summary * add test, organize types * update dependencies * only run on master and release branch |
||
|---|---|---|
| .. | ||
| dist | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| action.yaml | ||
| jest.config.js | ||
| jest.setup.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
Save JUnit Test Report to TMS Action
GitHub Action to save JUnit test reports to Zephyr Scale Test Management System.
Usage
- name: Save JUnit test report to Zephyr
uses: ./.github/actions/save-junit-report-tms
with:
report-path: ./test-reports/report.xml
zephyr-api-key: ${{ secrets.ZEPHYR_API_KEY }}
build-image: ${{ env.BUILD_IMAGE }}
zephyr-folder-id: '27504432' # Optional, defaults to 27504432
jira-project-key: 'MM' # Optional, defaults to MM
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
report-path |
Path to the XML test report file (from artifact) | Yes | - |
zephyr-api-key |
Zephyr Scale API key | Yes | - |
build-image |
Docker build image used for testing | Yes | - |
zephyr-folder-id |
Zephyr Scale folder ID | No | 27504432 |
jira-project-key |
Jira project key | No | MM |
Outputs
| Output | Description |
|---|---|
test-cycle |
The created test cycle key in Zephyr Scale |
test-keys-execution-count |
Total number of test executions (including duplicates) |
test-keys-unique-count |
Number of unique test keys successfully saved to Zephyr |
junit-total-tests |
Total number of tests in the JUnit XML report |
junit-total-passed |
Number of passed tests in the JUnit XML report |
junit-total-failed |
Number of failed tests in the JUnit XML report |
junit-pass-rate |
Pass rate percentage from the JUnit XML report |
junit-duration-seconds |
Total test duration in seconds from the JUnit XML report |
Local Development
- Copy
.env.exampleto.envand fill in your values - Run
npm installto install dependencies - Run
npm run pretterto format code - Run
npm testto run unit tests - Run
npm run local-actionto test locally - Run
npm run buildto build for production
Submitting Code Changes
IMPORTANT: When submitting code changes, you must run the following checks locally as there are no CI jobs for this action:
- Run
npm run prettierto format your code - Run
npm testto ensure all tests pass - Run
npm run buildto compile your changes - Include the updated
dist/folder in your commit
GitHub Actions runs the compiled code from the dist/ folder, not the source TypeScript files. If you don't include the built files, your changes won't be reflected in the action.
Report Format
The action expects a JUnit XML format report with test case names containing Zephyr test keys in the format {PROJECT_KEY}-T{NUMBER} (e.g., MM-T1234, FOO-T5678).
The test key pattern is automatically determined by the jira-project-key input (defaults to MM).
Example:
<testsuites tests="10" failures="2" errors="0" time="45.2">
<testsuite name="mmctl tests" tests="10" failures="2" time="45.2" timestamp="2024-01-01T00:00:00Z">
<testcase name="MM-T1234 - Test user creation" time="2.5"/>
<testcase name="MM-T1235 - Test user login" time="3.2">
<failure message="Login failed"/>
</testcase>
</testsuite>
</testsuites>