Skip to content

ci: add playwright test for prividium guide #382

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

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

sarahschwartz
Copy link
Contributor

adds a test for the prividium guide using playwright

@sarahschwartz sarahschwartz self-assigned this May 30, 2025
@sarahschwartz sarahschwartz changed the title test: add playwright test for prividium guide ci: add playwright test for prividium guide May 30, 2025
Copy link

github-actions bot commented May 30, 2025

Visit the preview URL for this PR (updated for commit d93a856):

https://zksync-docs-staging-5eb09--pr382-sarah-add-prividium-o7p6gjm1.web.app

(expires Tue, 15 Jul 2025 14:17:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bfaafba5fa82d4f63473aaa76a21fabf1fbb3a11

Comment on lines 9 to 56
timeout-minutes: 120
runs-on: ubuntu-latest
strategy:
matrix:
tutorial:
- "run-prividium-guide"

steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Start the docs
run: bun pm2 start 'PORT=3030 bun dev' --name docs

# ZK STACK DEPENCENCIES
- uses: actions/setup-node@v4
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config cmake clang lldb lld libssl-dev libpq-dev curl
cargo install cargo-nextest --locked
cargo install sqlx-cli --version 0.8.1 --locked
- name: Install Foundry-ZKsync
uses: dutterbutter/foundry-zksync-toolchain@v1
- name: Install ZK Stack CLI
run: |
curl -L https://raw.githubusercontent.com/matter-labs/zksync-era/main/zkstack_cli/zkstackup/install | bash
export PATH="$HOME/.local/bin:$PATH"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
zkstackup
- name: Check Version
run: |
zkstack --version

- name: Run test for ${{ matrix.tutorial }}
uses: sarahschwartz/tutorial-tester@main
with:
tutorial-paths: '["zk-stack/prividium/run-prividium-chain"]'
config-path: 'tests/prividium.ts'
folder-name: 'prividium'
custom-timeout: 55000000
wait-time: 300000
debug-mode: 'true'

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 days ago

To fix the issue, add a permissions block at the root of the workflow file. This block will apply to all jobs in the workflow unless overridden by a job-specific permissions block. Based on the workflow's actions, it appears that only contents: read is required, as the workflow primarily installs dependencies, sets up tools, and runs tests without modifying the repository.

The permissions block should be added after the name field and before the on field in the workflow file.


Suggested changeset 1
.github/workflows/playwright.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml
--- a/.github/workflows/playwright.yaml
+++ b/.github/workflows/playwright.yaml
@@ -1,2 +1,4 @@
 name: Playwright Tests
+permissions:
+  contents: read
 
EOF
@@ -1,2 +1,4 @@
name: Playwright Tests
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant