From 2bc7c3de0576dae13657735592bca1dde7b02460 Mon Sep 17 00:00:00 2001 From: syimyuzya Date: Mon, 9 Sep 2024 15:59:11 +0800 Subject: [PATCH] Upgrade deps & update workflow --- .github/workflows/publish-cos.yml | 14 +++++++++++--- .github/workflows/publish-npm.yml | 20 ++++++++++++++------ .github/workflows/test.yml | 25 ++++++++++++++++--------- package-lock.json | 30 +++++++++++++++--------------- package.json | 4 ++-- 5 files changed, 58 insertions(+), 35 deletions(-) diff --git a/.github/workflows/publish-cos.yml b/.github/workflows/publish-cos.yml index 2ec09b6..5ee500a 100644 --- a/.github/workflows/publish-cos.yml +++ b/.github/workflows/publish-cos.yml @@ -13,15 +13,23 @@ jobs: - uses: actions/checkout@v4 # Build + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Build + run: python build.py > index.js + + # Test - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22' registry-url: https://registry.npmjs.org/ - - name: Install Node.js packages + - name: Install Node.js dependencies run: npm ci - - name: Build - run: python build.py > index.js + - name: Run tests + run: npm test # Publish - name: Install coscmd diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 87a4147..c8307e3 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -8,18 +8,26 @@ jobs: publish-npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Build + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Build + run: python build.py > index.js + + # Test - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 14 + node-version: '22' registry-url: https://registry.npmjs.org/ - - name: Install Node.js packages + - name: Install Node.js dependencies run: npm ci - - name: Build - run: python build.py > index.js + - name: Run tests + run: npm test # Publish - name: Publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6083c9d..34c42e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,10 @@ name: Test on: push: - branches: [main] + branches: + - main + - dev + - dev-* pull_request: branches: [main] @@ -10,19 +13,23 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Build - - name: Setup Node.js - uses: actions/setup-node@v1 + - name: Setup Python + uses: actions/setup-python@v5 with: - node-version: 14 - registry-url: https://registry.npmjs.org/ - - name: Install Node.js packages - run: npm ci + python-version: '3.12' - name: Build run: python build.py > index.js # Test - - name: Test + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: https://registry.npmjs.org/ + - name: Install Node.js dependencies + run: npm ci + - name: Run tests run: npm test diff --git a/package-lock.json b/package-lock.json index 3c7c966..5f6024e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,39 +9,39 @@ "version": "20230224.0.0", "license": "CC0-1.0", "dependencies": { - "tshet-uinh": "^0.15.0-beta.7", - "tshet-uinh-deriver-tools": "^0.2.0-beta.7" + "tshet-uinh": "^0.15.0", + "tshet-uinh-deriver-tools": "^0.2.0" } }, "node_modules/tshet-uinh": { - "version": "0.15.0-beta.7", - "resolved": "https://registry.npmjs.org/tshet-uinh/-/tshet-uinh-0.15.0-beta.7.tgz", - "integrity": "sha512-/gCb3f6jZGdmut5BHMJGS0h2JAkzYT7ADbN8oVaPMXp5feOjkL8vnYLDpEFfIufHxJ4g268i6Bi/N4laZ028FQ==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/tshet-uinh/-/tshet-uinh-0.15.0.tgz", + "integrity": "sha512-3AVKGnh4C+uX82syBSjgiHryRWbkOi22OLAf96hyqKJm231sz11/KrgiSnqjgPCp29GaMv/l7b1wUA1YuV1tmg==", "license": "MIT", "engines": { "node": "^18.18 || ^20.9 || ^21 || >=22" } }, "node_modules/tshet-uinh-deriver-tools": { - "version": "0.2.0-beta.7", - "resolved": "https://registry.npmjs.org/tshet-uinh-deriver-tools/-/tshet-uinh-deriver-tools-0.2.0-beta.7.tgz", - "integrity": "sha512-1w8MtCOd84eIjwdoHEDM3Jz5z61iqU27Arlw29epu9XDlrsqHLirgVG578vHwbiK4aM30gu71UYqSBm188MhGA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tshet-uinh-deriver-tools/-/tshet-uinh-deriver-tools-0.2.0.tgz", + "integrity": "sha512-r4MKw5fmezav00yGDzJkvfwvGnoKPPMmgjJtICFzKSULqUgKLaQQOGieor2Ts48NKcR+0sqOmW3ne2gTjVJa5w==", "license": "MIT", "peerDependencies": { - "tshet-uinh": "^0.15.0-beta" + "tshet-uinh": "^0.15.0" } } }, "dependencies": { "tshet-uinh": { - "version": "0.15.0-beta.7", - "resolved": "https://registry.npmjs.org/tshet-uinh/-/tshet-uinh-0.15.0-beta.7.tgz", - "integrity": "sha512-/gCb3f6jZGdmut5BHMJGS0h2JAkzYT7ADbN8oVaPMXp5feOjkL8vnYLDpEFfIufHxJ4g268i6Bi/N4laZ028FQ==" + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/tshet-uinh/-/tshet-uinh-0.15.0.tgz", + "integrity": "sha512-3AVKGnh4C+uX82syBSjgiHryRWbkOi22OLAf96hyqKJm231sz11/KrgiSnqjgPCp29GaMv/l7b1wUA1YuV1tmg==" }, "tshet-uinh-deriver-tools": { - "version": "0.2.0-beta.7", - "resolved": "https://registry.npmjs.org/tshet-uinh-deriver-tools/-/tshet-uinh-deriver-tools-0.2.0-beta.7.tgz", - "integrity": "sha512-1w8MtCOd84eIjwdoHEDM3Jz5z61iqU27Arlw29epu9XDlrsqHLirgVG578vHwbiK4aM30gu71UYqSBm188MhGA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tshet-uinh-deriver-tools/-/tshet-uinh-deriver-tools-0.2.0.tgz", + "integrity": "sha512-r4MKw5fmezav00yGDzJkvfwvGnoKPPMmgjJtICFzKSULqUgKLaQQOGieor2Ts48NKcR+0sqOmW3ne2gTjVJa5w==", "requires": {} } } diff --git a/package.json b/package.json index 189789c..eb6287b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/nk2028/tshet-uinh-examples#readme", "dependencies": { - "tshet-uinh": "^0.15.0-beta.7", - "tshet-uinh-deriver-tools": "^0.2.0-beta.7" + "tshet-uinh": "^0.15.0", + "tshet-uinh-deriver-tools": "^0.2.0" } }