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

Implement CI improvements outlined in #3925 #5301

Closed
60 changes: 60 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Setup env
description: Sets up node and pnpm

inputs:
pnpm-version:
description: Version of pnpm to install
required: false
default: "9"
node-version:
description: Version of node to install
required: false
default: "18"
cache-restore:
description: Whether to restore the pnpm cache
required: false
default: "true"
cache-save:
description: Whether to save the pnpm cache
required: false
default: "false"
pnpm-lockfile:
description: Path to the pnpm lockfile
required: false
default: "pnpm-lock.yaml"
package-json:
description: Path to the package.json file
required: false
default: "package.json"
outputs:
cache-hit:
description: Whether the cache was restored
value: ${{ steps.node.outputs.cache-hit }}

runs:
using: composite
steps:
- if: inputs.cache-save == 'true' && inputs.cache-restore == 'false'
run: |
echo "::error::Saving the cache without restoring it is not supported"
exit 1
shell: bash
- uses: pnpm/action-setup@v4
with:
version: ${{ inputs.pnpm-version }}
package_json_file: ${{ inputs.package-json }}
- uses: actions/setup-node@v4
id: node
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache-save == 'true' && 'pnpm' || '' }}
cache-dependency-path: ${{ inputs.pnpm-lockfile }}
- id: pnpm
if: inputs.cache-save == 'false' && inputs.cache-restore == 'true'
run: pnpm store path --silent | xargs -I {} -0 echo "path={}" | tee -a $GITHUB_OUTPUT
shell: bash
- uses: actions/cache/restore@v4
if: inputs.cache-save == 'false' && inputs.cache-restore == 'true'
with:
path: ${{ steps.pnpm.outputs.path }}
key: node-cache-${{ runner.os }}-pnpm-${{ hashFiles(inputs.pnpm-lockfile) }}
10 changes: 2 additions & 8 deletions .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ jobs:
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- uses: ./.github/actions/setup-env
- name: Delete pnpm-lock.yaml
run: "rm pnpm-lock.yaml"
- name: Install
Expand All @@ -34,7 +28,7 @@ jobs:
run: pnpm test || (echo "===== Retry =====" && pnpm test)
- name: Notify failures
if: failure()
uses: slackapi/slack-github-action@v1.18.0
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
with:
payload: |
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.0
- uses: actions/add-to-project@9bfe908f2eaa7ba10340b31e314148fcfe6a2458 # v1.0.1
with:
project-url: https://github.com/orgs/NomicFoundation/projects/4
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
2 changes: 1 addition & 1 deletion .github/workflows/add-label-to-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const issue = await github.rest.issues.get({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoassign-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
// each user has a chance of (p - (previousP ?? 0)) to be assigned
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoassign-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const externalPrTriager = "kanej";
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-changeset-added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# don't run this check in the changesets PR
if: github.head_ref != 'changeset-release/main'
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const pullNumber = context.issue.number;
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/check-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,28 @@ name: Check Docs Site
on:
push:
branches:
- "**"
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
lint:
name: Lint
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: ./.github/actions/setup-env
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
pnpm-lockfile: docs/pnpm-lock.yaml
package-json: docs/package.json
- name: Install Docs
run: cd docs && pnpm install --frozen-lockfile --prefer-offline
- name: lint
run: cd docs && pnpm lint
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: cd docs && pnpm build
run: pnpm build
54 changes: 0 additions & 54 deletions .github/workflows/comment-on-linter-error.yml

This file was deleted.

12 changes: 4 additions & 8 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: E2E tests
on:
push:
branches:
- "main"
- main
pull_request:
branches:
- "main"

jobs:
run-e2e:
Expand All @@ -29,12 +27,10 @@ jobs:
IS_WINDOWS: ${{ matrix.os == 'windows-latest' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
- uses: ./.github/actions/setup-env
with:
node-version: 18
pnpm-lockfile: docs/pnpm-lock.yaml
package-json: docs/package.json
- name: Run fixture-projects script
run: |
cd e2e
Expand Down
92 changes: 0 additions & 92 deletions .github/workflows/hardhat-chai-matchers-ci.yml

This file was deleted.

Loading
Loading