-
Notifications
You must be signed in to change notification settings - Fork 3
Add zksync os setup in CI #50
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
base: main
Are you sure you want to change the base?
Conversation
LCOV Report ✅All Files
Changed FilesN/A |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout the repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Foundry | ||
| uses: foundry-rs/[email protected] | ||
| with: | ||
| # zksync-os-server's zkos-l1-state.json doesn't work on latest version of anvil | ||
| version: v1.3.4 | ||
|
|
||
| - name: Install dependencies | ||
| run: forge soldeer install | ||
|
|
||
| - name: Build contracts | ||
| run: forge build | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.20.0 | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: lts/Jod | ||
| cache: pnpm | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pnpm install -r --frozen-lockfile | ||
| cd ${{ github.workspace }}/.. | ||
| git clone https://github.com/eth-infinitism/account-abstraction | ||
| git clone https://github.com/matter-labs/zksync-os-server | ||
| - name: Run server | ||
| run: | | ||
| cd ${{ github.workspace }}/../zksync-os-server | ||
| cargo build --release --bin zksync-os-server | ||
| anvil --load-state zkos-l1-state.json --port 8545 &> anvil.log & | ||
| cargo run --release --bin zksync-os-server &> zksync.log & | ||
| - name: Deploy entrypoint | ||
| run: | | ||
| cd ${{ github.workspace }}/../account-abstraction | ||
| git checkout v0.8.0 | ||
| sed -i "60a zksyncos: { url: 'http://localhost:3050', accounts: ['0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110'] }," hardhat.config.ts | ||
| pnpm install | ||
| pnpm run deploy --network zksyncos | ||
| - name: Deploy contracts and a test account | ||
| run: | | ||
| pnpm deploy-test:zksync-os | ||
| - name: Run bundler | ||
| run: pnpm bundler:zksync-os &> bundler.log & | ||
|
|
||
| - name: Run integration tests | ||
| run: | | ||
| # Rich account | ||
| PRIVATE_KEY=0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110 | ||
| # send 10 ETH | ||
| TO=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 | ||
| cast send --private-key ${PRIVATE_KEY} --rpc-url http://localhost:3050 ${TO} --value 10000000000000000000 | ||
| pnpm test:zksync-os |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 5 hours ago
To fix this issue, we should add a permissions block to the zksync-os job definition in .github/workflows/ci.yaml, restricting permissions to the minimum necessary. Since the job only checks out code and runs build/test tasks, it likely only needs contents: read permission (as recommended for jobs not interacting with issues, PRs, or requiring elevated repository access). The change should be made directly after the runs-on: ubuntu-latest line in the zksync-os job definition.
No new imports, packages, or definitions are required—just an addition to the YAML workflow.
-
Copy modified lines R133-R134
| @@ -130,6 +130,8 @@ | ||
|
|
||
| zksync-os: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout the repository | ||
| uses: actions/checkout@v5 |
No description provided.