Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test #876

Merged
merged 2 commits into from
Jul 4, 2024
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
5 changes: 5 additions & 0 deletions .changeset/proud-foxes-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Add integration test
36 changes: 32 additions & 4 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"devDependencies": {
"typedoc": "^0.26.3",
"typedoc-plugin-mermaid": "workspace:*"
"typedoc-plugin-mermaid": "workspace:*",
"typescript": "*"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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