diff --git a/.changeset/proud-foxes-destroy.md b/.changeset/proud-foxes-destroy.md new file mode 100644 index 0000000..d4e076b --- /dev/null +++ b/.changeset/proud-foxes-destroy.md @@ -0,0 +1,5 @@ +--- +"typedoc-plugin-mermaid": patch +--- + +Add integration test diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 32ab9f9..fad6e81 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -61,8 +61,8 @@ jobs: with: name: dist path: dist - test: - name: Test on node ${{ matrix.node-version }} + unit_test: + name: Unit Test on node ${{ matrix.node-version }} needs: - check_format - check_type @@ -82,17 +82,45 @@ jobs: env: CI: true + integration_test: + name: Integration Test on TypeDoc ${{ matrix.typedoc-version }} + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + fail-fast: False + matrix: + typedoc-version: + - '^0.23.x' + - '^0.24.x' + - '^0.25.x' + - '^0.26.x' + needs: + - build + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Setup + uses: ./.github/actions/setup + - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + - name: TypeDoc integration test + working-directory: example + run: | + pnpm add -D typedoc@${{ matrix.typedoc-version }} + pnpm doc + release: name: Release runs-on: ubuntu-latest needs: - build - - test + - unit_test + - integration_test # if repository is github.com/kamiazya/typedoc-plugin-mermaid # and branch is main # and before job is successful # then run this job - if: ${{ github.repository == 'kamiazya/typedoc-plugin-mermaid' && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.build.result == 'success' && needs.test.result == 'success' }} + if: ${{ github.repository == 'kamiazya/typedoc-plugin-mermaid' && github.ref == 'refs/heads/main' && github.event_name == 'push' && success() }} permissions: contents: write # Used to commit to "Version Packages" PR pull-requests: write # Used to create "Version Packages" PR diff --git a/example/package.json b/example/package.json index 357d6bf..6df4fd6 100644 --- a/example/package.json +++ b/example/package.json @@ -7,6 +7,7 @@ }, "devDependencies": { "typedoc": "^0.26.3", - "typedoc-plugin-mermaid": "workspace:*" + "typedoc-plugin-mermaid": "workspace:*", + "typescript": "*" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3dfde6f..bd4cf98 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,6 +48,9 @@ importers: typedoc-plugin-mermaid: specifier: workspace:* version: link:.. + typescript: + specifier: '*' + version: 5.4.5 packages: