Skip to content
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
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build PerformanceProfiler Plugin
on:
push:
branches:
- "**/*"
tags:
- "v*"
- "*@v*"
# pull_request:
# types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-latest
env:
NODE_ENV: production

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install libs
run: sudo apt-get install --no-install-recommends -y libjson-perl libyaml-perl zip

- name: Build plugin
run: |
perl Makefile.PL
make manifest
make zipdist
make dist

- name: Upload all plugins
id: upload-all-plugins
uses: actions/upload-artifact@v4
with:
name: plugin
path: |
mt-plugin-PerformanceProfiler-*

- name: Upload tarball
id: upload-tarball
uses: actions/upload-artifact@v4
with:
name: tarball
path: |
mt-plugin-PerformanceProfiler-*.tar.gz

- name: Add comment to PR
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
if: ${{ github.event_name == 'pull_request' }}
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
### Download Links

You can download the build artifacts from the following links:

- **All Plugins**: [Download from Actions Artifacts](${{ steps.upload-all-plugins.outputs.artifact-url }})
- **Tarball**: [Download from Actions Artifacts](${{ steps.upload-tarball.outputs.artifact-url }})

- name: Upload package to GitHub Releases
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8
with:
draft: true
files: |
mt-plugin-PerformanceProfiler-*.zip
mt-plugin-PerformanceProfiler-*.tar.gz
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test
on:
push:
branches:
- "**/*"
tags:
- "v*"
- "*@v*"
# pull_request:
# types: [opened, synchronize]

jobs:
perl:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- { image: cloud7 }
- { image: buster }
- { image: bullseye }
- { image: fedora35 }
- { image: fedora37 }
- { image: fedora40 }
- { image: fedora41 }
- { image: fedora42 }
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v4
with:
persist-credentials: false
repository: movabletype/movabletype
ref: develop
path: mt
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
docker run --rm \
-v ${{ github.workspace }}/mt:/app \
-v ${{ github.workspace }}/addons/PerformanceProfiler.pack:/app/addons/PerformanceProfiler.pack \
-w /app \
-e MT_TEST_ENV_ADMIN_THEME_ID=${{ matrix.admin_theme_id }} \
ghcr.io/movabletype/movabletype/test:${{ matrix.config.image }} \
bash -c 'cpm install -g Devel::NYTProf && prove -j4 -PMySQLPool=MT::Test::Env -It/lib addons/PerformanceProfiler.pack/t'
2 changes: 1 addition & 1 deletion addons/PerformanceProfiler.pack/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: PerformanceProfiler
version: 0.0.9
version: 0.0.10
description: <__trans phrase="Recored performace profile.">
author_name: Six Apart Ltd.
author_link: https://www.movabletype.org/
Expand Down