Core project test #135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Core project test | |
on: | |
push: | |
paths: | |
- 'package.json' | |
- '.github/workflows/action2.yml' | |
schedule: | |
- cron: '00 4 * * 0,1,3,5' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'version' | |
required: false | |
default: 'v1.0.1' | |
jobs: | |
core: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get properties | |
id: json_properties | |
uses: zoexx/github-action-json-file-properties@release | |
with: | |
file_path: "package.json" | |
prop_path: "dependencies.vue" | |
- run: | | |
echo ${{steps.json_properties.outputs.value}} | |
- name: update-repo | |
uses: wangsongc/[email protected] | |
with: | |
github_token: ${{ secrets.TEST_AUTH_TOKEN }} | |
source_repo: 'https://github.com/vuejs/core.git' | |
source_branch: 'main' | |
source_tag: 'v${{steps.json_properties.outputs.value}}' | |
target_repo: 'https://github.com/wangsongc/core.git' | |
- name: core test | |
run: | | |
cd core | |
npm i pnpm -g | |
pnpm install | |
pnpm test | |
vue-i18n-next: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get properties | |
id: json_properties | |
uses: zoexx/github-action-json-file-properties@release | |
with: | |
file_path: "package.json" | |
prop_path: "dependencies.vue-i18n" | |
- run: | | |
echo ${{steps.json_properties.outputs.value}} | |
- name: update-repo | |
uses: wangsongc/[email protected] | |
with: | |
github_token: ${{ secrets.TEST_AUTH_TOKEN }} | |
source_repo: 'https://github.com/intlify/vue-i18n-next.git' | |
source_branch: 'master' | |
source_tag: 'v${{steps.json_properties.outputs.value}}' | |
target_repo: 'https://github.com/wangsongc/vue-i18n-next.git' | |
- name: vue-i18n-next test | |
run: | | |
cd vue-i18n-next | |
yarn | |
yarn build | |
# 修改核心依赖版本 | |
sed -i 's|^.*@vue/server-renderer.*$|"@vue/server-renderer": "3.2.31",|' package.json | |
sed -i 's|^.*"vue":.*$|"vue": "3.2.31",|' package.json | |
yarn | |
yarn test:e2e | |
router: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get properties | |
id: json_properties | |
uses: zoexx/github-action-json-file-properties@release | |
with: | |
file_path: "package.json" | |
prop_path: "dependencies.vue-router" | |
- run: | | |
echo ${{steps.json_properties.outputs.value}} | |
- name: update-repo | |
uses: wangsongc/[email protected] | |
with: | |
github_token: ${{ secrets.TEST_AUTH_TOKEN }} | |
source_repo: 'https://github.com/vuejs/router.git' | |
source_branch: 'main' | |
source_tag: 'v${{steps.json_properties.outputs.value}}' | |
target_repo: 'https://github.com/wangsongc/router.git' | |
- name: router test | |
run: | | |
cd router | |
yarn | |
yarn build | |
sed -i 's|^.*@vue/compiler-sfc":.*$|"@vue/compiler-sfc": "^3.2.31",|' package.json | |
sed -i 's|^.*@vue/server-renderer":.*$|"@vue/server-renderer": "^3.2.31",|' package.json | |
sed -i 's|^.*"vue":.*.,$|"vue": "3.2.31",|' package.json | |
sed -i 's|^.*"vue":.*."$|"vue": "3.2.31"|' package.json | |
yarn | |
yarn test:unit | |
yarn test:e2e:ci | |
pinia: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get properties | |
id: json_properties | |
uses: zoexx/github-action-json-file-properties@release | |
with: | |
file_path: "package.json" | |
prop_path: "dependencies.pinia" | |
- run: | | |
echo ${{steps.json_properties.outputs.value}} | |
- name: update-repo | |
uses: wangsongc/[email protected] | |
with: | |
github_token: ${{ secrets.TEST_AUTH_TOKEN }} | |
source_repo: 'https://github.com/vuejs/pinia.git' | |
source_branch: 'v2' | |
source_tag: 'pinia@${{steps.json_properties.outputs.value}}' | |
target_repo: 'https://github.com/wangsongc/pinia.git' | |
- name: pinia | |
run: | | |
cd pinia | |
yarn | |
yarn test |