Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
update test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tu.Le committed Sep 20, 2023
1 parent ff190bf commit 9c2b54e
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 0 deletions.
118 changes: 118 additions & 0 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: "SDK publish on release TEST"

on:
workflow_run:
workflows: ["testing-test"]
branches: [devops/update-cicd-pipeline]
types:
- completed

jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Setup Python
uses: actions/setup-python@v4

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: generate code and namespace
shell: bash
run: |
cd web3rpc/codegen && gradle wrapper && gradle wrapper clean :deployJar && cd - &&\
cd web3rpc/rpc-specs && npm install && bash -x generate-namespace.sh && cd
- name: Verify Changed files
uses: tj-actions/changed-files@v39
id: verify-changed-files
with:
files_yaml: |
ethers-ext:
- "ethers-ext/package.json"
web3js-ext:
- "web3js-ext/package.json"
web3j-ext:
- "web3j-ext/web3j-ext/build.gradle"
web3py-ext:
- "web3py-ext/setup.py"
web3rpc:
- "web3rpc/rpc-specs/**"
- name: generate web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
cd web3py-ext &&\
python -m pip install build wheel twine &&\
ls -ls &&\
python setup.py bdist_wheel &&\
cd -
- name: Publish web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"
- name: Publish web3j-ext
if: steps.verify-changed-files.outputs.web3j-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"
- name: generate ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
shell: bash
run: |
cd ethers-ext && npm install && npm run build && cd -
- name: publish ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"
- name: generate web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
cd web3rpc/sdk/client/javascript && bash -x javascript-generate.sh && cd -
- name: publish web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
echo "OK"
- name: generate web3rpc-java sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
cd web3rpc/sdk/client/java && bash -x java-generate.sh && cd -
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}

- name: Publish web3rpc-java sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
echo "OK"
27 changes: 27 additions & 0 deletions .github/workflows/testing-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: testing

on:
push:
branches:
- devops/update-cicd-pipeline
pull_request:
types:
- opened
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: testing ethers-ext
shell: bash
run: |
cd ethers-ext && npm install && npm run lint && npm run test

0 comments on commit 9c2b54e

Please sign in to comment.