From c45d07766598e58fb8404ea415ab81424ba6312f Mon Sep 17 00:00:00 2001 From: ByteZhang Date: Mon, 5 Aug 2024 20:04:01 +0800 Subject: [PATCH] chore: optimize ci name --- ...st_web.yml => deploy-dapp-example-web.yml} | 6 ++-- ...h-packages.yml => publish-npm-package.yml} | 2 +- .github/workflows/test-example-web-build.yml | 30 +++++++++++++++++++ .github/workflows/{CI.yml => test-lint.yml} | 4 +-- 4 files changed, 35 insertions(+), 7 deletions(-) rename .github/workflows/{test_web.yml => deploy-dapp-example-web.yml} (94%) rename .github/workflows/{publish-packages.yml => publish-npm-package.yml} (98%) create mode 100644 .github/workflows/test-example-web-build.yml rename .github/workflows/{CI.yml => test-lint.yml} (96%) diff --git a/.github/workflows/test_web.yml b/.github/workflows/deploy-dapp-example-web.yml similarity index 94% rename from .github/workflows/test_web.yml rename to .github/workflows/deploy-dapp-example-web.yml index 02e1b53a..77ea7f66 100644 --- a/.github/workflows/test_web.yml +++ b/.github/workflows/deploy-dapp-example-web.yml @@ -1,14 +1,12 @@ -name: test_web +name: deploy-dapp-example-web on: workflow_dispatch: push: branches: [main,master] - pull_request: - branches: [main,master] jobs: - test_web: + deploy: runs-on: ubuntu-latest env: TEST_ENDPOINT: dapp-example.onekeytest.com diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-npm-package.yml similarity index 98% rename from .github/workflows/publish-packages.yml rename to .github/workflows/publish-npm-package.yml index c8b84002..755286d6 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-npm-package.yml @@ -1,4 +1,4 @@ -name: publish-packages +name: publish-npm-packages on: workflow_dispatch diff --git a/.github/workflows/test-example-web-build.yml b/.github/workflows/test-example-web-build.yml new file mode 100644 index 00000000..466f2ed6 --- /dev/null +++ b/.github/workflows/test-example-web-build.yml @@ -0,0 +1,30 @@ +name: test-example-web-build + +on: + pull_request: + branches: [main,master] + +jobs: + test_build_web: + runs-on: ubuntu-latest + env: + TEST_ENDPOINT: dapp-example.onekeytest.com + steps: + - uses: actions/checkout@v4 + + - name: Setup Environment + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + cache: 'yarn' + + - name: Install Dependency + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo 'skipped yarn install at workspace root' + + - name: Build Target + run: | + yarn example-build diff --git a/.github/workflows/CI.yml b/.github/workflows/test-lint.yml similarity index 96% rename from .github/workflows/CI.yml rename to .github/workflows/test-lint.yml index 2a569be8..98e841be 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/test-lint.yml @@ -1,4 +1,4 @@ -name: CI +name: test-lint on: pull_request: @@ -9,7 +9,7 @@ on: - master jobs: - test: + lint: runs-on: ${{ matrix.os }} strategy: