diff --git a/.github/workflows/eth_deploy.yml b/.github/workflows/eth_deploy.yml index 007dd3c..c9d0dd0 100644 --- a/.github/workflows/eth_deploy.yml +++ b/.github/workflows/eth_deploy.yml @@ -37,7 +37,7 @@ jobs: node-version: latest - name: Install dependencies run: npm install web3 - - uses: actions/download-artifact@master + - uses: actions/download-artifact@v4 with: name: sc_connector.json - name: Run tests @@ -54,3 +54,34 @@ jobs: cat integration/sc_connector.json node --no-deprecation integration/tester.js shell: bash + connector_updater: + name: ETH connector PR + needs: integration_test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Create new branch + run: | + branch_name=new-connector-$(eval "date +%y%m%d-%H%M%S") + git checkout -b ${branch_name} + - uses: actions/download-artifact@v4 + with: + name: sc_connector.json + - name: Update files + run: | + cp sc_connector.json ui/ + cp sc_connector.json integration/ + - name: Commit changes + run: | + git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}" + git config --global user.name "github-actions[bot]" + git add ui/ integration/ + git commit -m "${branch_name}" + - name: Push changes + run: | + git push origin ${branch_name} + - name: Create pull request + run: gh pr create -B master -H ${branch_name} --title 'Merge ${branch_name} into base_branch' --body 'Created by GitHub Action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/eth_unit_tests.yml b/.github/workflows/eth_unit_tests.yml index 6b4fbb3..d885388 100644 --- a/.github/workflows/eth_unit_tests.yml +++ b/.github/workflows/eth_unit_tests.yml @@ -11,7 +11,7 @@ jobs: name: ETH UT steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Environment Setup uses: actions/setup-node@v4 with: diff --git a/.gitignore b/.gitignore index a5af114..020bd64 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,12 @@ **/artifacts/ **/.deps/ -integration/node_modules/ -integration/package-lock.json -integration/package.json +**/node_modules/ +**/package-lock.json +**/package.json **/test/ bin/ cache/ -**/out/ \ No newline at end of file +**/out/ + +sc_connector.json \ No newline at end of file diff --git a/eth/cyrograf.sol b/eth/cyrograf.sol index ee6d2a4..ee56bf9 100644 --- a/eth/cyrograf.sol +++ b/eth/cyrograf.sol @@ -18,7 +18,7 @@ contract Cyrograf { Background currentBackground; constructor() { - currentBackground = Background(msg.sender, RGB(0,0,0), RGB(30,20,10)); + currentBackground = Background(msg.sender, RGB(0,100,0), RGB(30,20,10)); } function getBackground() public view returns (Background memory){ diff --git a/integration/tester.js b/integration/tester.js index 586596b..a1d2e8e 100644 --- a/integration/tester.js +++ b/integration/tester.js @@ -47,6 +47,7 @@ const fs = require('node:fs/promises'); } } + await getBackground(); await setBackground(0, 0, 0, 255, 255, 255); await getBackground(); await setBackground(21, 37, 69, 128, 64, 32);