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

Add yarn changesets #2949

Merged
merged 11 commits into from
Nov 22, 2023
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
75 changes: 15 additions & 60 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -71,6 +73,10 @@ jobs:
needs: [yarn-install]
steps:
- uses: actions/checkout@v3
with:
# check out full history
fetch-depth: 0

- uses: actions/cache@v3
with:
path: |
Expand All @@ -90,27 +96,25 @@ jobs:
exit 1
fi

test-ts:
test:
runs-on: ubuntu-latest
needs: [yarn-build]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1

- uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

- name: sdk
run: yarn workspace @hyperlane-xyz/sdk run test

- name: helloworld
run: yarn workspace @hyperlane-xyz/helloworld run test

- name: infra
run: yarn workspace @hyperlane-xyz/infra run test
- name: Unit Tests
run: yarn test
yorhodes marked this conversation as resolved.
Show resolved Hide resolved

test-cli:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -152,64 +156,15 @@ jobs:
- name: Test ${{ matrix.environment }} ${{ matrix.module }} deployment (check, deploy, govern, check again)
run: cd typescript/infra && ./fork.sh ${{ matrix.environment }} ${{ matrix.module }}

test-sol:
env:
ETHERSCAN_API_KEY: ''

coverage:
runs-on: ubuntu-latest
needs: [yarn-build]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1

- name: Install dependencies
run: cd solidity && forge install

- name: Forge build
run: cd solidity && forge build --build-info

#- name: gas
# run: yarn workspace @hyperlane-xyz/core run gas-ci

- name: Unit tests
run: yarn workspace @hyperlane-xyz/core run test

- name: Static analysis
uses: crytic/[email protected]
id: slither
with:
target: 'solidity/'
slither-config: 'solidity/slither.config.json'
sarif: results.sarif
fail-on: none
ignore-compile: true
fetch-depth: 0

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}

coverage-sol:
runs-on: ubuntu-latest
needs: [yarn-build]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ./*
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
permissions:
id-token: write
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# check out full history
fetch-depth: 0
submodules: recursive

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
yorhodes marked this conversation as resolved.
Show resolved Hide resolved
id: changesets
uses: changesets/action@v1
with:
publish: yarn build && yarn publish:all
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: static-analysis

on:
# Triggers the workflow on pull request against main
pull_request:
branches: [main]
paths:
- 'solidity/**'

jobs:
slither:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}

- run: yarn workspaces focus @hyperlane-xyz/core

- name: Static analysis
uses: crytic/[email protected]
id: slither
with:
target: 'solidity/'
slither-config: 'solidity/slither.config.json'
sarif: results.sarif
fail-on: none

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
670 changes: 335 additions & 335 deletions .yarn/releases/yarn-4.0.1.cjs → .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"

yarnPath: .yarn/releases/yarn-4.0.1.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
"lint-staged": "^12.4.3",
"prettier": "^2.8.8"
},
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.26.2"
yorhodes marked this conversation as resolved.
Show resolved Hide resolved
},
"packageManager": "[email protected]",
"private": true,
"scripts": {
"build": "yarn workspaces foreach --all --parallel --topological run build",
"clean": "yarn workspaces foreach --all --parallel run clean",
"prettier": "yarn workspaces foreach --all --parallel run prettier",
"lint": "yarn workspaces foreach --all --parallel run lint",
"test": "yarn workspaces foreach --all --parallel run test",
"coverage": "yarn workspaces foreach --all --parallel run coverage",
"version:prepare": "yarn workspaces foreach --all --no-private --topological version --immediate",
"publish:all": "yarn workspaces foreach --all --no-private --topological npm publish --access public",
"postinstall": "husky install",
"version:check": "yarn version check --interactive"
"prettier": "yarn workspaces foreach --since --parallel run prettier",
"lint": "yarn workspaces foreach --since --parallel run lint",
"test": "yarn workspaces foreach --since --parallel run test",
"coverage": "yarn workspaces foreach --since --parallel run coverage",
"version:prepare": "yarn changeset version",
"version:check": "yarn changeset status",
"publish:all": "yarn changeset publish",
"postinstall": "husky install"
},
"workspaces": [
"solidity",
Expand Down
Loading
Loading