Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto PR #34

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/eth_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/eth_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
**/out/

sc_connector.json
2 changes: 1 addition & 1 deletion eth/cyrograf.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
1 change: 1 addition & 0 deletions integration/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading