[feature]: enhance DMS system compliance for GB 42250-2022 standard #1322
This file contains hidden or 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
name: CI | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
pull_request: | |
branches: [main, 'main-ee', release*, 'temporary/**'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
checker: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/catch-install-pnpm | |
- name: Code lint checker | |
run: pnpm checker | |
test-ee: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
matrix: | |
shard: [1, 2, 3, 4] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/catch-install-pnpm | |
- name: Coverage test report ee | |
run: sh ./scripts/jest/run-ci-ee.sh ${{ matrix.shard }} ${{ strategy.job-total }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-artifacts-${{ matrix.shard }} | |
path: coverage/ | |
test-ce: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/catch-install-pnpm | |
- name: Coverage test report ce | |
run: sh ./scripts/jest/run-ci-ce.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ce-coverage-artifacts | |
path: ce_coverage/ | |
report: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
needs: [test-ee, test-ce] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get CE Coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: ce-coverage-artifacts | |
path: ce_coverage | |
- name: Get EE Coverage 1 | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-artifacts-1 | |
path: coverage | |
- name: Get EE Coverage 2 | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-artifacts-2 | |
path: coverage | |
- name: Get EE Coverage 3 | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-artifacts-3 | |
path: coverage | |
- name: Get EE Coverage 4 | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-artifacts-4 | |
path: coverage | |
- name: Install dependencies | |
uses: ./.github/actions/catch-install-pnpm | |
- name: Merge coverage reports | |
run: node ./scripts/jest/merge-report-json.js | |
- name: Coverage test report | |
uses: ArtiomTr/jest-coverage-report-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
base-coverage-file: coverage-merged.json | |
coverage-file: coverage-merged.json | |
- name: Delete artifact | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: | | |
ce-coverage-artifacts | |
coverage-artifacts-1 | |
coverage-artifacts-2 | |
coverage-artifacts-3 | |
coverage-artifacts-4 |