mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 07:59:36 +00:00
🔧 Sync .github/workflows with develop
Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
This commit is contained in:
parent
b283d952a8
commit
94555c027e
44
.github/workflows/build-adhoc.yml
vendored
Normal file
44
.github/workflows/build-adhoc.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: _ADHOC
|
||||||
|
|
||||||
|
run-name: >-
|
||||||
|
_ADHOC (${{ inputs.gh_ref }}${{ inputs.nitrate_ref != '' && format(' / nitrate:{0}', inputs.nitrate_ref) || '' }})
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
gh_ref:
|
||||||
|
description: 'Branch/ref to build in penpot/penpot'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
nitrate_ref:
|
||||||
|
description: 'Branch/ref to build admin-console in penpot/penpot-nitrate (defaults to gh_ref)'
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built/promoted'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-bundle:
|
||||||
|
uses: ./.github/workflows/build-bundle.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: ${{ inputs.gh_ref }}
|
||||||
|
force: ${{ inputs.force }}
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
needs: build-bundle
|
||||||
|
uses: ./.github/workflows/build-docker.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: ${{ inputs.gh_ref }}
|
||||||
|
force: ${{ inputs.force }}
|
||||||
|
|
||||||
|
build-docker-admin-console:
|
||||||
|
uses: ./.github/workflows/build-docker-admin-console.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: ${{ inputs.nitrate_ref || inputs.gh_ref }}
|
||||||
|
force: ${{ inputs.force }}
|
||||||
48
.github/workflows/build-bundle.yml
vendored
48
.github/workflows/build-bundle.yml
vendored
@ -9,6 +9,11 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if this version already exists in S3'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
gh_ref:
|
gh_ref:
|
||||||
@ -16,20 +21,31 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if this version already exists in S3'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
|
# Literal group name: under `workflow_call`, `github.workflow` resolves to the
|
||||||
|
# caller's workflow, which put this workflow and the other reusable one called
|
||||||
|
# by the same caller into a single shared group, and left a manual dispatch of
|
||||||
|
# the same ref in a group of its own, free to race on the same artifacts.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ inputs.gh_ref }}
|
group: build-bundle-${{ inputs.gh_ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ── 1. Decide whether there is anything to build ───────────────────────
|
# ── 1. Decide whether there is anything to build ───────────────────────
|
||||||
check:
|
check:
|
||||||
name: Check current bundle
|
name: Check current bundle
|
||||||
runs-on: penpot-runner-01
|
runs-on: penpot-standar-runner
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
outputs:
|
outputs:
|
||||||
gh_ref: ${{ steps.vars.outputs.gh_ref }}
|
gh_ref: ${{ steps.vars.outputs.gh_ref }}
|
||||||
bundle_version: ${{ steps.vars.outputs.bundle_version }}
|
bundle_version: ${{ steps.vars.outputs.bundle_version }}
|
||||||
|
sha: ${{ steps.vars.outputs.sha }}
|
||||||
|
commit_title: ${{ steps.vars.outputs.commit_title }}
|
||||||
exists: ${{ steps.check.outputs.exists }}
|
exists: ${{ steps.check.outputs.exists }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -44,10 +60,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "gh_ref=${{ inputs.gh_ref || github.ref_name }}" >> $GITHUB_OUTPUT
|
echo "gh_ref=${{ inputs.gh_ref || github.ref_name }}" >> $GITHUB_OUTPUT
|
||||||
echo "bundle_version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
|
echo "bundle_version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
|
||||||
|
echo "sha=$(git rev-parse --short=12 HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
echo "commit_title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# The uploaded zip carries its version as S3 metadata. If the
|
# The uploaded zip carries its version as S3 metadata. If the
|
||||||
# existing object was already built from this same commit, the
|
# existing object was already built from this same commit, the
|
||||||
# whole build job is skipped.
|
# whole build job is skipped. `force` bypasses this check entirely.
|
||||||
- name: Check if this bundle is already built
|
- name: Check if this bundle is already built
|
||||||
id: check
|
id: check
|
||||||
env:
|
env:
|
||||||
@ -55,6 +73,16 @@ jobs:
|
|||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ inputs.force }}" = "true" ]; then
|
||||||
|
echo "exists=false" >> $GITHUB_OUTPUT
|
||||||
|
{
|
||||||
|
echo "### 🔁 Bundle build forced"
|
||||||
|
echo ""
|
||||||
|
echo "\`force: true\` — skipping the S3 version check."
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
EXISTING_VERSION=$(aws s3api head-object \
|
EXISTING_VERSION=$(aws s3api head-object \
|
||||||
--bucket ${{ secrets.S3_BUCKET }} \
|
--bucket ${{ secrets.S3_BUCKET }} \
|
||||||
--key "penpot-${{ steps.vars.outputs.gh_ref }}.zip" \
|
--key "penpot-${{ steps.vars.outputs.gh_ref }}.zip" \
|
||||||
@ -75,7 +103,7 @@ jobs:
|
|||||||
# ── 2. Build and upload, only when needed ──────────────────────────────
|
# ── 2. Build and upload, only when needed ──────────────────────────────
|
||||||
build:
|
build:
|
||||||
name: Build and Upload Penpot Bundle
|
name: Build and Upload Penpot Bundle
|
||||||
runs-on: penpot-runner-01
|
runs-on: penpot-standar-runner
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
needs: check
|
needs: check
|
||||||
if: needs.check.outputs.exists == 'false'
|
if: needs.check.outputs.exists == 'false'
|
||||||
@ -113,10 +141,20 @@ jobs:
|
|||||||
s3://${{ secrets.S3_BUCKET }}/penpot-${{ needs.check.outputs.gh_ref }}.zip \
|
s3://${{ secrets.S3_BUCKET }}/penpot-${{ needs.check.outputs.gh_ref }}.zip \
|
||||||
--metadata bundle-version=${{ needs.check.outputs.bundle_version }}
|
--metadata bundle-version=${{ needs.check.outputs.bundle_version }}
|
||||||
|
|
||||||
|
- name: Write step summary
|
||||||
|
run: |
|
||||||
|
{
|
||||||
|
echo "### ✅ Bundle built"
|
||||||
|
echo ""
|
||||||
|
echo "- Version: \`${{ needs.check.outputs.bundle_version }}\` (\`git describe --tags --always\`)"
|
||||||
|
echo "- Commit: [\`${{ needs.check.outputs.sha }}\`](https://github.com/${{ github.repository }}/commit/${{ needs.check.outputs.sha }}) — ${{ needs.check.outputs.commit_title }}"
|
||||||
|
echo "- Built at: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
# ── 3. Single failure notification for the whole workflow ─────────────
|
# ── 3. Single failure notification for the whole workflow ─────────────
|
||||||
notify:
|
notify:
|
||||||
name: Notify failure
|
name: Notify failure
|
||||||
runs-on: penpot-runner-01
|
runs-on: penpot-standar-runner
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
needs: [check, build]
|
needs: [check, build]
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
18
.github/workflows/build-develop.yml
vendored
18
.github/workflows/build-develop.yml
vendored
@ -1,16 +1,30 @@
|
|||||||
name: _DEVELOP
|
name: _DEVELOP
|
||||||
|
|
||||||
|
run-name: >-
|
||||||
|
_DEVELOP (develop @ ${{ github.sha }})
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built/promoted'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '16 5-20 * * 1-5'
|
- cron: '16 5-20 * * 1-5'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bundle:
|
build-bundle:
|
||||||
uses: ./.github/workflows/build-bundle.yml
|
uses: ./.github/workflows/build-bundle.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "develop"
|
gh_ref: "develop"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
needs: build-bundle
|
needs: build-bundle
|
||||||
@ -18,9 +32,11 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "develop"
|
gh_ref: "develop"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
build-admin-console-docker:
|
build-docker-admin-console:
|
||||||
uses: ./.github/workflows/build-docker-admin-console.yml
|
uses: ./.github/workflows/build-docker-admin-console.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "develop"
|
gh_ref: "develop"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|||||||
11
.github/workflows/build-docker-admin-console.yml
vendored
11
.github/workflows/build-docker-admin-console.yml
vendored
@ -13,6 +13,11 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
gh_ref:
|
gh_ref:
|
||||||
@ -24,6 +29,11 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
secrets:
|
secrets:
|
||||||
ORG_WORKFLOW_TOKEN:
|
ORG_WORKFLOW_TOKEN:
|
||||||
description: 'Token with Actions write access on penpot-nitrate'
|
description: 'Token with Actions write access on penpot-nitrate'
|
||||||
@ -47,6 +57,7 @@ jobs:
|
|||||||
|
|
||||||
gh workflow run "$WORKFLOW" --repo "$REPO" --ref "$DISPATCH_REF" \
|
gh workflow run "$WORKFLOW" --repo "$REPO" --ref "$DISPATCH_REF" \
|
||||||
-f gh_ref="$GH_REF" \
|
-f gh_ref="$GH_REF" \
|
||||||
|
-f force="${{ inputs.force }}" \
|
||||||
-f caller_run_id="$DISTINCT_ID" \
|
-f caller_run_id="$DISTINCT_ID" \
|
||||||
-f caller_run_url="$CALLER_URL"
|
-f caller_run_url="$CALLER_URL"
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/build-docker-devenv.yml
vendored
2
.github/workflows/build-docker-devenv.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
name: Build and push DevEnv Docker image
|
name: Build and push DevEnv Docker image
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set common environment variables
|
- name: Set common environment variables
|
||||||
|
|||||||
53
.github/workflows/build-docker.yml
vendored
53
.github/workflows/build-docker.yml
vendored
@ -8,6 +8,11 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if this sha is already promoted'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
gh_ref:
|
gh_ref:
|
||||||
@ -15,9 +20,18 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if this sha is already promoted'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
|
# Literal group name: under `workflow_call`, `github.workflow` resolves to the
|
||||||
|
# caller's workflow, which put this workflow and the other reusable one called
|
||||||
|
# by the same caller into a single shared group, and left a manual dispatch of
|
||||||
|
# the same ref in a group of its own, free to race on the same artifacts.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ inputs.gh_ref }}
|
group: build-docker-${{ inputs.gh_ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -32,12 +46,13 @@ jobs:
|
|||||||
# ── 1. Resolve the build key and check the whole set at once ───────────
|
# ── 1. Resolve the build key and check the whole set at once ───────────
|
||||||
prepare:
|
prepare:
|
||||||
name: Prepare
|
name: Prepare
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
outputs:
|
outputs:
|
||||||
gh_ref: ${{ steps.vars.outputs.gh_ref }}
|
gh_ref: ${{ steps.vars.outputs.gh_ref }}
|
||||||
bundle_version: ${{ steps.vars.outputs.bundle_version }}
|
bundle_version: ${{ steps.vars.outputs.bundle_version }}
|
||||||
sha: ${{ steps.vars.outputs.sha }}
|
sha: ${{ steps.vars.outputs.sha }}
|
||||||
|
commit_title: ${{ steps.vars.outputs.commit_title }}
|
||||||
exists: ${{ steps.check.outputs.exists }}
|
exists: ${{ steps.check.outputs.exists }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -56,6 +71,7 @@ jobs:
|
|||||||
GH_REF="${{ inputs.gh_ref || github.ref_name }}"
|
GH_REF="${{ inputs.gh_ref || github.ref_name }}"
|
||||||
echo "gh_ref=$GH_REF" >> $GITHUB_OUTPUT
|
echo "gh_ref=$GH_REF" >> $GITHUB_OUTPUT
|
||||||
echo "sha=$(git rev-parse --short=12 HEAD)" >> $GITHUB_OUTPUT
|
echo "sha=$(git rev-parse --short=12 HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
echo "commit_title=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
BUNDLE_VERSION=$(aws s3api head-object \
|
BUNDLE_VERSION=$(aws s3api head-object \
|
||||||
--bucket ${{ secrets.S3_BUCKET }} \
|
--bucket ${{ secrets.S3_BUCKET }} \
|
||||||
@ -67,7 +83,8 @@ jobs:
|
|||||||
# The image set is a single block, so a single set-level check is
|
# The image set is a single block, so a single set-level check is
|
||||||
# enough: `promote` drops a marker object in S3 only after every
|
# enough: `promote` drops a marker object in S3 only after every
|
||||||
# image was built AND every branch tag was moved. Marker present
|
# image was built AND every branch tag was moved. Marker present
|
||||||
# means there is nothing at all to do for this commit.
|
# means there is nothing at all to do for this commit. `force`
|
||||||
|
# bypasses this check entirely.
|
||||||
- name: Check if this image set is already built
|
- name: Check if this image set is already built
|
||||||
id: check
|
id: check
|
||||||
env:
|
env:
|
||||||
@ -75,6 +92,21 @@ jobs:
|
|||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ inputs.force }}" = "true" ]; then
|
||||||
|
echo "exists=false" >> $GITHUB_OUTPUT
|
||||||
|
mkdir -p "$BUNDLE_CACHE"
|
||||||
|
find "$BUNDLE_CACHE" -type f -mtime +1 -delete || true
|
||||||
|
ZIP="$BUNDLE_CACHE/penpot-${{ steps.vars.outputs.bundle_version }}.zip"
|
||||||
|
aws s3 cp "s3://${{ secrets.S3_BUCKET }}/penpot-${{ steps.vars.outputs.gh_ref }}.zip" "$ZIP.$$.tmp"
|
||||||
|
mv "$ZIP.$$.tmp" "$ZIP"
|
||||||
|
{
|
||||||
|
echo "### 🔁 Image set build forced"
|
||||||
|
echo ""
|
||||||
|
echo "\`force: true\` — skipping the S3 marker check."
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if aws s3api head-object \
|
if aws s3api head-object \
|
||||||
--bucket ${{ secrets.S3_BUCKET }} \
|
--bucket ${{ secrets.S3_BUCKET }} \
|
||||||
--key "markers/images-sha-${{ steps.vars.outputs.sha }}" \
|
--key "markers/images-sha-${{ steps.vars.outputs.sha }}" \
|
||||||
@ -103,7 +135,7 @@ jobs:
|
|||||||
# ── 2. One build per image, in parallel, only when needed ──────────────
|
# ── 2. One build per image, in parallel, only when needed ──────────────
|
||||||
build:
|
build:
|
||||||
name: Build ${{ matrix.image }}
|
name: Build ${{ matrix.image }}
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
needs: prepare
|
needs: prepare
|
||||||
if: needs.prepare.outputs.exists == 'false'
|
if: needs.prepare.outputs.exists == 'false'
|
||||||
@ -134,7 +166,7 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
# To avoid the “429 Too Many Requests” error when downloading
|
# To avoid the "429 Too Many Requests" error when downloading
|
||||||
# images from DockerHub for unregistered users.
|
# images from DockerHub for unregistered users.
|
||||||
# https://docs.docker.com/docker-hub/usage/
|
# https://docs.docker.com/docker-hub/usage/
|
||||||
- name: Login to DockerHub Registry
|
- name: Login to DockerHub Registry
|
||||||
@ -216,7 +248,7 @@ jobs:
|
|||||||
# the S3 marker guarantees the branch tags were already moved.
|
# the S3 marker guarantees the branch tags were already moved.
|
||||||
promote:
|
promote:
|
||||||
name: Promote image set
|
name: Promote image set
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
needs: [prepare, build]
|
needs: [prepare, build]
|
||||||
|
|
||||||
@ -254,16 +286,23 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ github.run_id }}" | aws s3 cp - \
|
echo "${{ github.run_id }}" | aws s3 cp - \
|
||||||
"s3://${{ secrets.S3_BUCKET }}/markers/images-sha-${{ needs.prepare.outputs.sha }}"
|
"s3://${{ secrets.S3_BUCKET }}/markers/images-sha-${{ needs.prepare.outputs.sha }}"
|
||||||
|
|
||||||
|
- name: Write step summary
|
||||||
|
run: |
|
||||||
{
|
{
|
||||||
echo "### ✅ Image set promoted"
|
echo "### ✅ Image set promoted"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "- Version: \`${{ needs.prepare.outputs.bundle_version }}\` (\`git describe --tags --always\`)"
|
||||||
|
echo "- Commit: [\`${{ needs.prepare.outputs.sha }}\`](https://github.com/${{ github.repository }}/commit/${{ needs.prepare.outputs.sha }}) — ${{ needs.prepare.outputs.commit_title }}"
|
||||||
|
echo "- Built at: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
|
||||||
|
echo ""
|
||||||
echo "All \`:${{ needs.prepare.outputs.gh_ref }}\` tags now point to \`sha-${{ needs.prepare.outputs.sha }}\`."
|
echo "All \`:${{ needs.prepare.outputs.gh_ref }}\` tags now point to \`sha-${{ needs.prepare.outputs.sha }}\`."
|
||||||
} >> "$GITHUB_STEP_SUMMARY"
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
# ── 4. Single failure notification for the whole workflow ─────────────
|
# ── 4. Single failure notification for the whole workflow ─────────────
|
||||||
notify:
|
notify:
|
||||||
name: Notify failure
|
name: Notify failure
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
needs: [prepare, build, promote]
|
needs: [prepare, build, promote]
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
18
.github/workflows/build-staging.yml
vendored
18
.github/workflows/build-staging.yml
vendored
@ -1,16 +1,30 @@
|
|||||||
name: _STAGING
|
name: _STAGING
|
||||||
|
|
||||||
|
run-name: >-
|
||||||
|
_STAGING (staging)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built/promoted'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '36 5-20 * * 1-5'
|
- cron: '36 5-20 * * 1-5'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bundle:
|
build-bundle:
|
||||||
uses: ./.github/workflows/build-bundle.yml
|
uses: ./.github/workflows/build-bundle.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "staging"
|
gh_ref: "staging"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
needs: build-bundle
|
needs: build-bundle
|
||||||
@ -18,9 +32,11 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "staging"
|
gh_ref: "staging"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
build-admin-console-docker:
|
build-docker-admin-console:
|
||||||
uses: ./.github/workflows/build-docker-admin-console.yml
|
uses: ./.github/workflows/build-docker-admin-console.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: "staging"
|
gh_ref: "staging"
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|||||||
32
.github/workflows/build-tag.yml
vendored
32
.github/workflows/build-tag.yml
vendored
@ -1,17 +1,33 @@
|
|||||||
name: _TAG
|
name: _TAG
|
||||||
|
|
||||||
|
run-name: >-
|
||||||
|
_TAG (${{ github.ref_name }} @ ${{ github.sha }})
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
force:
|
||||||
|
description: 'Rebuild and overwrite even if already built/promoted (manual re-releases only)'
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
|
# Keyed by ref and never cancelling: pushing 2.17.2 shortly after 2.17.2-RC1
|
||||||
|
# must not abort the release already in flight.
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref_name }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bundle:
|
build-bundle:
|
||||||
uses: ./.github/workflows/build-bundle.yml
|
uses: ./.github/workflows/build-bundle.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: ${{ github.ref_name }}
|
gh_ref: ${{ github.ref_name }}
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
needs: build-bundle
|
needs: build-bundle
|
||||||
@ -19,11 +35,21 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
gh_ref: ${{ github.ref_name }}
|
gh_ref: ${{ github.ref_name }}
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
|
build-docker-admin-console:
|
||||||
|
uses: ./.github/workflows/build-docker-admin-console.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: ${{ github.ref_name }}
|
||||||
|
force: ${{ inputs.force || false }}
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
name: Notifications
|
name: Notifications
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: build-docker
|
needs:
|
||||||
|
- build-docker
|
||||||
|
- build-docker-admin-console
|
||||||
steps:
|
steps:
|
||||||
- name: Notify Mattermost
|
- name: Notify Mattermost
|
||||||
uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
|
uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
|
||||||
@ -37,7 +63,9 @@ jobs:
|
|||||||
|
|
||||||
publish-final-tag:
|
publish-final-tag:
|
||||||
if: ${{ !contains(github.ref_name, '-RC') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && contains(github.ref_name, '.') }}
|
if: ${{ !contains(github.ref_name, '-RC') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && contains(github.ref_name, '.') }}
|
||||||
needs: build-docker
|
needs:
|
||||||
|
- build-docker
|
||||||
|
- build-docker-admin-console
|
||||||
uses: ./.github/workflows/release.yml
|
uses: ./.github/workflows/release.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
|
|||||||
24
.github/workflows/build-tmp-tokens.yml
vendored
Normal file
24
.github/workflows/build-tmp-tokens.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: _TMP TOKENS
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '46 5-20 * * 1-5'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-bundle:
|
||||||
|
uses: ./.github/workflows/build-bundle.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: "hiru-tokens-in-libs"
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
needs: build-bundle
|
||||||
|
uses: ./.github/workflows/build-docker.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
gh_ref: "hiru-tokens-in-libs"
|
||||||
2
.github/workflows/plugins-deploy-package.yml
vendored
2
.github/workflows/plugins-deploy-package.yml
vendored
@ -34,7 +34,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: penpot-runner-01
|
runs-on: penpot-standar-runner
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
2
.github/workflows/tests-backend.yml
vendored
2
.github/workflows/tests-backend.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
test-backend:
|
test-backend:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Backend Tests"
|
name: "Backend Tests"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
2
.github/workflows/tests-common.yml
vendored
2
.github/workflows/tests-common.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
test-common:
|
test-common:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Common Tests"
|
name: "Common Tests"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
2
.github/workflows/tests-composable-suite.yml
vendored
2
.github/workflows/tests-composable-suite.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
|||||||
composable-test-suite:
|
composable-test-suite:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Run composable test suite (mocked backend)"
|
name: "Run composable test suite (mocked backend)"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
2
.github/workflows/tests-frontend.yml
vendored
2
.github/workflows/tests-frontend.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
test-frontend:
|
test-frontend:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Frontend Tests"
|
name: "Frontend Tests"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
190
.github/workflows/tests-integration.yml
vendored
190
.github/workflows/tests-integration.yml
vendored
@ -5,11 +5,37 @@ defaults:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
gh_ref:
|
||||||
|
description: 'Name of the branch or ref'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: 'develop'
|
||||||
|
|
||||||
|
shards:
|
||||||
|
description: 'Shard layout (JSON array)'
|
||||||
|
type: choice
|
||||||
|
required: true
|
||||||
|
default: '[1, 2, 3, 4]'
|
||||||
|
options:
|
||||||
|
- '[1, 2, 3, 4]'
|
||||||
|
- '[1, 2, 3, 4, 5, 6]'
|
||||||
|
- '[1, 2]'
|
||||||
|
- '[1]'
|
||||||
|
|
||||||
|
workers:
|
||||||
|
description: 'Playwright workers per shard'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: '2'
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'frontend/**'
|
- 'frontend/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- 'render-wasm/**'
|
- 'render-wasm/**'
|
||||||
|
- '.github/workflows/tests-integration.yml'
|
||||||
|
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
@ -25,25 +51,41 @@ on:
|
|||||||
- 'frontend/**'
|
- 'frontend/**'
|
||||||
- 'common/**'
|
- 'common/**'
|
||||||
- 'render-wasm/**'
|
- 'render-wasm/**'
|
||||||
|
- '.github/workflows/tests-integration.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || inputs.gh_ref || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-integration:
|
build-integration:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Build Integration Bundle"
|
name: "Build Integration Bundle"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
|
timeout-minutes: 30
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
- /var/cache/github-runner/m2:/root/.m2
|
- /var/cache/github-runner/m2:/root/.m2
|
||||||
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
bundle_key: ${{ steps.vars.outputs.bundle_key }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# An empty `ref` makes checkout fall back to its default (the PR merge
|
||||||
|
# ref on pull_request, the pushed ref on push).
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.gh_ref }}
|
||||||
|
|
||||||
|
# The cache key must come from the SHA actually checked out: on a manual
|
||||||
|
# run `github.sha` points at the dispatching ref, not at `gh_ref`.
|
||||||
|
- name: Extract cache key
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
echo "bundle_key=integration-bundle-$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Bundle
|
- name: Build Bundle
|
||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
@ -53,58 +95,142 @@ jobs:
|
|||||||
- name: Store Bundle Cache
|
- name: Store Bundle Cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
key: "integration-bundle-${{ github.sha }}"
|
key: ${{ steps.vars.outputs.bundle_key }}
|
||||||
path: frontend/resources/public
|
path: frontend/resources/public
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Integration Tests"
|
name: "Integration Tests (${{ matrix.shard }})"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
|
timeout-minutes: 40
|
||||||
|
|
||||||
|
needs: build-integration
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
shard: ${{ fromJSON(inputs.shards || '[1, 2, 3, 4]') }}
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: penpotapp/devenv:latest
|
||||||
|
volumes:
|
||||||
|
- /var/cache/github-runner/m2:/root/.m2
|
||||||
|
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
||||||
|
- /var/cache/github-runner/ms-playwright:/ms-playwright
|
||||||
|
env:
|
||||||
|
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.gh_ref }}
|
||||||
|
|
||||||
|
- name: Restore Cache
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
with:
|
||||||
|
key: ${{ needs.build-integration.outputs.bundle_key }}
|
||||||
|
path: frontend/resources/public
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
working-directory: ./frontend
|
||||||
|
run: |
|
||||||
|
corepack enable;
|
||||||
|
corepack install;
|
||||||
|
pnpm install --frozen-lockfile;
|
||||||
|
|
||||||
|
# No-op once the shared volume is warm; keeps the first run working.
|
||||||
|
- name: Install Playwright Chromium
|
||||||
|
working-directory: ./frontend
|
||||||
|
run: pnpm exec playwright install chromium
|
||||||
|
|
||||||
|
# `strategy.job-total` is the matrix size, so the shard denominator
|
||||||
|
# follows the `shards` input without being hardcoded.
|
||||||
|
- name: Run Tests
|
||||||
|
working-directory: ./frontend
|
||||||
|
env:
|
||||||
|
WORKERS: ${{ inputs.workers }}
|
||||||
|
run: |
|
||||||
|
WORKERS=${WORKERS:-2}
|
||||||
|
echo "Running shard ${{ matrix.shard }}/${{ strategy.job-total }} with $WORKERS workers"
|
||||||
|
pnpm exec playwright test --project default \
|
||||||
|
--workers="$WORKERS" \
|
||||||
|
--shard=${{ matrix.shard }}/${{ strategy.job-total }} \
|
||||||
|
--reporter=blob
|
||||||
|
|
||||||
|
- name: Upload blob report
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: integration-blob-report-${{ matrix.shard }}
|
||||||
|
path: frontend/blob-report/
|
||||||
|
overwrite: true
|
||||||
|
retention-days: 3
|
||||||
|
|
||||||
|
- name: Upload test result
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: integration-tests-result-${{ matrix.shard }}
|
||||||
|
path: frontend/test-results/
|
||||||
|
overwrite: true
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 3
|
||||||
|
|
||||||
|
merge-reports:
|
||||||
|
if: ${{ always() && !github.event.pull_request.draft && needs.test-integration.result != 'skipped' }}
|
||||||
|
name: "Merge Integration Reports"
|
||||||
|
runs-on: penpot-extended-runner
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
needs: test-integration
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
- /var/cache/github-runner/m2:/root/.m2
|
- /var/cache/github-runner/m2:/root/.m2
|
||||||
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
- /var/cache/github-runner/gitlib:/root/.gitlibs
|
||||||
|
|
||||||
needs: build-integration
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Restore Cache
|
|
||||||
uses: actions/cache/restore@v5
|
|
||||||
with:
|
with:
|
||||||
key: "integration-bundle-${{ github.sha }}"
|
ref: ${{ inputs.gh_ref }}
|
||||||
path: frontend/resources/public
|
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Install deps
|
||||||
|
working-directory: ./frontend
|
||||||
|
run: |
|
||||||
|
corepack enable;
|
||||||
|
corepack install;
|
||||||
|
pnpm install --frozen-lockfile;
|
||||||
|
|
||||||
|
- name: Download blob reports
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
path: frontend/all-blob-reports
|
||||||
|
pattern: integration-blob-report-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Merge into HTML report
|
||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
env:
|
env:
|
||||||
PLAYWRIGHT_REPORTER: list,json
|
|
||||||
PLAYWRIGHT_JSON_OUTPUT_NAME: report.json
|
PLAYWRIGHT_JSON_OUTPUT_NAME: report.json
|
||||||
run: |
|
run: |
|
||||||
./scripts/test-e2e
|
pnpm exec playwright merge-reports \
|
||||||
|
--reporter=html,json,list ./all-blob-reports
|
||||||
|
|
||||||
- name: Flaky summary
|
- name: Test summary
|
||||||
if: always()
|
if: always()
|
||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
run: |
|
run: |
|
||||||
if [ ! -f report.json ]; then
|
if [ ! -f report.json ]; then
|
||||||
echo "No report.json produced (the run failed early)." >> "$GITHUB_STEP_SUMMARY"
|
echo "No report produced (all shards failed early)." >> "$GITHUB_STEP_SUMMARY"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
jq -r -f ../.github/scripts/playwright-summary.jq report.json >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
jq -r '
|
# Kept for 30 days so flakiness rates can be aggregated across runs
|
||||||
[ .. | objects
|
# without scraping job logs.
|
||||||
| select(has("tests") and has("file"))
|
|
||||||
| select(any(.tests[]; .status == "flaky"))
|
|
||||||
| "- `\(.file):\(.line)` — \(.title)"
|
|
||||||
] as $f
|
|
||||||
| "## Flaky tests: \($f | length)\n"
|
|
||||||
+ (if ($f | length) == 0 then "_none_" else ($f | join("\n")) end)
|
|
||||||
' report.json >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
|
|
||||||
- name: Upload JSON report
|
- name: Upload JSON report
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
if: always()
|
if: always()
|
||||||
@ -112,13 +238,13 @@ jobs:
|
|||||||
name: integration-json-report
|
name: integration-json-report
|
||||||
path: frontend/report.json
|
path: frontend/report.json
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
if-no-files-found: ignore
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Upload test result
|
- name: Upload HTML report
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
name: integration-tests-result
|
name: integration-html-report
|
||||||
path: frontend/test-results/
|
path: frontend/playwright-report/
|
||||||
overwrite: true
|
overwrite: true
|
||||||
retention-days: 3
|
retention-days: 7
|
||||||
|
|||||||
2
.github/workflows/tests-library.yml
vendored
2
.github/workflows/tests-library.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
test-library:
|
test-library:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Library Tests"
|
name: "Library Tests"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
2
.github/workflows/tests-mcp.yml
vendored
2
.github/workflows/tests-mcp.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
test-mcp:
|
test-mcp:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Test MCP"
|
name: "Test MCP"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container: penpotapp/devenv:latest
|
container: penpotapp/devenv:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
4
.github/workflows/tests-plugin-api-suite.yml
vendored
4
.github/workflows/tests-plugin-api-suite.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
|||||||
api-test-suite-mocked:
|
api-test-suite-mocked:
|
||||||
if: ${{ github.event_name != 'workflow_dispatch' && !github.event.pull_request.draft }}
|
if: ${{ github.event_name != 'workflow_dispatch' && !github.event.pull_request.draft }}
|
||||||
name: "Run Plugin API Test Suite (mocked)"
|
name: "Run Plugin API Test Suite (mocked)"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
@ -95,7 +95,7 @@ jobs:
|
|||||||
# api-test-suite-live:
|
# api-test-suite-live:
|
||||||
# if: ${{ github.event_name == 'workflow_dispatch' }}
|
# if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
# name: Run Plugin API Test Suite (live)
|
# name: Run Plugin API Test Suite (live)
|
||||||
# runs-on: penpot-runner-02
|
# runs-on: penpot-extended-runner
|
||||||
# container:
|
# container:
|
||||||
# image: penpotapp/devenv:latest
|
# image: penpotapp/devenv:latest
|
||||||
#
|
#
|
||||||
|
|||||||
2
.github/workflows/tests-plugins.yml
vendored
2
.github/workflows/tests-plugins.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
test-plugins:
|
test-plugins:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: Plugins Runtime Linter & Tests
|
name: Plugins Runtime Linter & Tests
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
2
.github/workflows/tests-wasm.yml
vendored
2
.github/workflows/tests-wasm.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
test-render-wasm:
|
test-render-wasm:
|
||||||
if: ${{ !github.event.pull_request.draft }}
|
if: ${{ !github.event.pull_request.draft }}
|
||||||
name: "Render WASM Tests"
|
name: "Render WASM Tests"
|
||||||
runs-on: penpot-runner-02
|
runs-on: penpot-extended-runner
|
||||||
container:
|
container:
|
||||||
image: penpotapp/devenv:latest
|
image: penpotapp/devenv:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user