584 lines
27 KiB
YAML
584 lines
27 KiB
YAML
name: packages/kits - next/required
|
|
'on':
|
|
push:
|
|
branches:
|
|
- next
|
|
paths:
|
|
- packages/kits/**
|
|
- packages/ui/**
|
|
- packages/stl/**
|
|
- packages/i18n/**
|
|
- .gitea/workflows/packages-kits-next-required.yml
|
|
- pnpm-lock.yaml
|
|
- .gitea/scripts/**
|
|
- .gitea/actions/**
|
|
concurrency:
|
|
group: ci-next-kits-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
jobs:
|
|
setup-stage:
|
|
name: Setup - Stage
|
|
runs-on: apex-debian13
|
|
outputs: {}
|
|
steps:
|
|
- name: Checkout repository
|
|
run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- name: Setup Node.js with pnpm cache
|
|
run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Pack dependency cache
|
|
run: python3 .gitea/scripts/cache.py pack
|
|
- uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: ${{ steps.dependency-cache.outputs.key }}
|
|
path: .ci/pnpm-store.tar
|
|
retention-days: 7
|
|
build-configs:
|
|
name: Build - Configs & UI
|
|
needs: setup-stage
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Build Rsbuild config
|
|
run: pnpm --filter @ermnvldmr/rsbuild-config build
|
|
- name: Build Storybook config
|
|
run: pnpm --filter @ermnvldmr/storybook-config build
|
|
- name: Build i18n
|
|
run: pnpm --filter @ermnvldmr/i18n build
|
|
- name: Build UI
|
|
run: pnpm --filter @ermnvldmr/ui build
|
|
- name: Upload Rsbuild Config
|
|
uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
retention-days: 30
|
|
- name: Upload Storybook Config
|
|
uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
retention-days: 30
|
|
- name: Upload i18n dist
|
|
uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
retention-days: 30
|
|
- name: Upload UI dist
|
|
uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
retention-days: 30
|
|
lint-kits:
|
|
name: Lint - Kits
|
|
needs: build-configs
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Lint Kits package
|
|
run: pnpm --filter @ermnvldmr/kits lint
|
|
typecheck-kits:
|
|
name: Typecheck - Kits
|
|
needs: build-configs
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Typecheck Kits package
|
|
run: pnpm --filter @ermnvldmr/kits typecheck
|
|
test-kits:
|
|
name: Test - Unit
|
|
needs: build-configs
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Test Kits package
|
|
run: pnpm --filter @ermnvldmr/kits test:coverage
|
|
build-storybook:
|
|
name: Build - Storybook
|
|
needs: build-configs
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Build Kits Storybook
|
|
run: pnpm --filter @ermnvldmr/kits build-storybook
|
|
- name: Upload Storybook build
|
|
uses: ./.gitea/actions/upload-artifact
|
|
with:
|
|
name: kits-storybook-static-${{ github.run_id }}
|
|
path: packages/kits/storybook-static/
|
|
retention-days: 30
|
|
test-storybook:
|
|
name: Test - Storybook
|
|
needs: build-storybook
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Install Playwright browsers
|
|
run: pnpm --filter @ermnvldmr/kits exec playwright install --with-deps chromium
|
|
- name: Download Storybook build
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: kits-storybook-static-${{ github.run_id }}
|
|
path: packages/kits/storybook-static/
|
|
- name: Test Storybook
|
|
run: pnpm --filter @ermnvldmr/kits test:storybook:ci
|
|
build-kits:
|
|
name: Build - Kits
|
|
needs: build-configs
|
|
runs-on: apex-debian13
|
|
steps:
|
|
- run: "set -euo pipefail\ncase \"$CHECKOUT_REF\" in -*) exit 1;; esac\nGITHUB_SERVER_URL=${GITHUB_SERVER_URL%/}\n\
|
|
case \"$GITHUB_SERVER_URL\" in https://git.ermnvldmr.com) ;; *) exit 1;; esac\n\
|
|
AUTH=$(printf 'deytenit:%s' \"$CHECKOUT_TOKEN\" | base64 -w0)\nHEADER=\"http.${GITHUB_SERVER_URL}/.extraheader=AUTHORIZATION:\
|
|
\ basic $AUTH\"\ngit init \"$GITHUB_WORKSPACE\"\ncd \"$GITHUB_WORKSPACE\"\n\
|
|
git remote add origin \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git\"\ngit -c\
|
|
\ \"$HEADER\" fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'\n\
|
|
git -c \"$HEADER\" fetch origin \"$CHECKOUT_REF\"\ngit checkout --detach FETCH_HEAD\n\
|
|
test \"$(git rev-parse HEAD)\" = \"$GITHUB_SHA\"\nif [ \"$CHECKOUT_SUBMODULES\"\
|
|
\ = recursive ]; then\n key_file=$(mktemp \"${RUNNER_TEMP:-/tmp}/hextra-key.XXXXXX\"\
|
|
)\n trap 'rm -f \"$key_file\"' EXIT\n umask 077\n printf '%s\\n'\
|
|
\ \"$HEXTRA_READ_KEY\" > \"$key_file\"\n chmod 600 \"$key_file\"\n export\
|
|
\ GIT_SSH_COMMAND=\"ssh -T -i $key_file -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes\
|
|
\ -o HostKeyAlgorithms=ssh-ed25519 -o UserKnownHostsFile=$GITHUB_WORKSPACE/.gitea/known_hosts\"\
|
|
\n git submodule update --init --recursive\nfi\nif [ \"$PERSIST_CREDENTIALS\"\
|
|
\ = true ]; then\n git config \"http.${GITHUB_SERVER_URL}/.extraheader\"\
|
|
\ \"AUTHORIZATION: basic $AUTH\"\nfi\n"
|
|
env:
|
|
CHECKOUT_REF: ${{ github.sha }}
|
|
CHECKOUT_SUBMODULES: 'false'
|
|
CHECKOUT_TOKEN: ${{ github.token }}
|
|
PERSIST_CREDENTIALS: 'false'
|
|
HEXTRA_READ_KEY: ''
|
|
- name: Install pnpm
|
|
run: 'case "$PNPM_VERSION" in 8|9|9.12.3) ;; *) exit 1;; esac
|
|
|
|
test -x "/opt/ci/pnpm/$PNPM_VERSION/bin/pnpm"
|
|
|
|
echo "/opt/ci/pnpm/$PNPM_VERSION/bin" >> "$GITHUB_PATH"'
|
|
env:
|
|
PNPM_VERSION: 9.12.3
|
|
- run: "case \"$NODE_VERSION\" in\n 18*) major=18;; 20*) major=20;; 22*) major=22;;\
|
|
\ *) exit 1;;\nesac\ntest -x \"/opt/ci/node/$major/bin/node\"\necho \"/opt/ci/node/$major/bin\"\
|
|
\ >> \"$GITHUB_PATH\""
|
|
env:
|
|
NODE_VERSION: '20'
|
|
- name: Restore repository dependency cache
|
|
id: dependency-cache
|
|
run: python3 .gitea/scripts/cache.py restore
|
|
env:
|
|
CACHE_TOKEN: ${{ github.token }}
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Rsbuild Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: rsbuild-config-dist-${{ github.run_id }}
|
|
path: packages/rsbuild-config/dist
|
|
- name: Download Storybook Config
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: storybook-config-dist-${{ github.run_id }}
|
|
path: packages/storybook-config/dist
|
|
- name: Download i18n dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: i18n-dist-${{ github.run_id }}
|
|
path: packages/i18n/dist
|
|
- name: Download UI dist
|
|
uses: ./.gitea/actions/download-artifact
|
|
with:
|
|
name: ui-dist-${{ github.run_id }}
|
|
path: packages/ui/dist
|
|
- name: Build Kits package
|
|
run: pnpm --filter @ermnvldmr/kits build
|