From aa3f062c42737b1e99bcc65f044545d1bdebf96a Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Tue, 31 Oct 2023 10:05:32 +0100 Subject: [PATCH] check for broken links --- .../workflows/broken-link-check-cron.yml.txt | 16 ----------- .github/workflows/pr-tests.yml | 27 ++++++++++++++----- docs/how-to/run-suave.mdx | 8 +++--- 3 files changed, 24 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/broken-link-check-cron.yml.txt diff --git a/.github/workflows/broken-link-check-cron.yml.txt b/.github/workflows/broken-link-check-cron.yml.txt deleted file mode 100644 index e1b833e5..00000000 --- a/.github/workflows/broken-link-check-cron.yml.txt +++ /dev/null @@ -1,16 +0,0 @@ -name: Check for broken links (cron) - -on: - workflow_dispatch: - schedule: - - cron: '0 10 * * *' - -jobs: - check-for-broken-links: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - run: npm install -g linkinator - - run: linkinator https://docs.flashbots.net --recurse --timeout 3000 --concurrency 10 --retry -s https://dune.com/ChainsightAnalytics,'https://.*etherscan.io/tx.*','https://twitter.com.*','https://.*imgur.com.*' diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index e0a7dc7e..fbfc631c 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -16,9 +16,15 @@ jobs: token: ${{ secrets.SPECS_TOKEN }} submodules: recursive + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ^1.21 + - uses: actions/setup-node@v1 with: - node-version: '16.x' + node-version: '20.x' + - name: Test build env: TARGET_URL: "https://docs.flashbots.net" @@ -26,8 +32,17 @@ jobs: run: | yarn install --frozen-lockfile yarn build - # - name: Check for broken links - # run: | - # cd build - # npm install -g linkinator - # linkinator "**/*.html" --recurse --timeout 3000 --concurrency 10 --retry -s https://dune.com/ChainsightAnalytics,'https://.*etherscan.io/.*','https://twitter.com.*','https://.*imgur.com.*' + + - name: Check for broken links + run: | + go install github.com/raviqqe/muffet/v2@latest + + echo -e "BASE_URL=/docs/\nTARGET_URL=http://localhost:3000" > .env + yarn serve & + sleep 5 + echo "Checking for broken links..." + muffet http://localhost:3000/docs/ \ + --exclude="notion[.]so" \ + -e "github[.]com/flashbots/suave-specs" \ + -e "github[.]com/flashbots/suave-bridge" \ + -e "algolia[.]net" diff --git a/docs/how-to/run-suave.mdx b/docs/how-to/run-suave.mdx index f6039e60..fac3c062 100644 --- a/docs/how-to/run-suave.mdx +++ b/docs/how-to/run-suave.mdx @@ -36,7 +36,7 @@ cd suave-geth/ ``` 3. Run SUAVE (depending on your docker setup, you may need to run this as `sudo`): ```bash -make devnet-up +make devnet-up ``` ### Optional testing @@ -62,8 +62,6 @@ Step 3: Send backrun If you'd like to examine the Go code responsible for deploying contracts and sending transactions, you can do so [here](https://github.com/flashbots/suave-geth/blob/main/suave/devenv/cmd/main.go). -You can also navigate to [http://localhost:8080](http://localhost:8080) in your browser to see a local block explorer. - 5. You can stop your docker containers with: ```bash make devnet-down @@ -121,7 +119,7 @@ make suave ``` 2. Run this command: ```bash -./build/bin/suave --suave.dev +./build/bin/suave --suave.dev ``` ### What to do next @@ -142,7 +140,7 @@ You can also run any familiar Geth command you like. Start by generating a new a If the `--datadir` flag is not set, a geth client stores data in the `$HOME/.ethereum` directory. Depending on the chain you use, it creates a subdirectory. For example, if you run Sepolia, geth creates `$HOME/.ethereum/sepolia/`. So, if you use the `--suave` flag, your data ends up in `$HOME/.ethereum/suave/...`. -#### Using the console +#### Using the console You can attach to the usual Geth javascript console to get any interactive data you need with: