-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WORKFLOWS] Update Nixpkgs Inputs & Update Node Dependencies (#1390)
- update nixpkgs - update ghc - added node20, but keep node18 as default since subgraph local testing doesn't work with it. - remove certora - update node depenencies target minor versions. Postponing to future PRs: - next steps: - graphql-request related major version update: ``` @graphql-codegen/cli ^2.16.5 → ^5.0.0 @graphql-codegen/introspection ^2.2.3 → ^4.0.0 @graphql-codegen/typed-document-node ^2.3.13 → ^5.0.1 @graphql-codegen/typescript ^2.8.8 → ^4.0.1 @graphql-codegen/typescript-operations ^2.5.13 → ^4.0.1 ethers 5.7.2 → 6.7.0 graphql-request ^4.3.0 → ^6.1.0 ``` - node20-by-default update. - improve ethereum-contracts artifacts packaging (1.8.0 release). - improve metadata packaging, to support more framework. - aspirational next steps, keeping up with the Kardashians - pnpm migration. - sdk-core v2 with multi-frameworks support - probably never: - ethers-v6 update. Create PR Artifact broken by lerna update. Let it be fore now, to be fixed.
- Loading branch information
Showing
70 changed files
with
3,156 additions
and
2,358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Reusable Workflow | Test Ethereum Contracts | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
run-coverage-tests: | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
# Ahhhhhhhhhh, it is silly, but the only way to preparing conditional matrix. | ||
# Ref: https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional | ||
matrix-prep: | ||
name: Preparing Conditional Strategy Matrix | ||
|
||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- id: set-matrix | ||
run: | | ||
if [ "${{ inputs.run-coverage-tests }}" == "true" ];then | ||
echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" | ||
fi | ||
test-ethereum-contracts: | ||
name: Test ethereum-contracts | ||
|
||
needs: [matrix-prep] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} | ||
|
||
defaults: | ||
run: | ||
shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: cachix/install-nix-action@v19 | ||
with: | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Initialize devShell | ||
run: | | ||
node --version | ||
yarn --version | ||
solc --version | ||
- name: Yarn Install | ||
run: | | ||
yarn install --frozen-lockfile | ||
npx tsc --version | ||
npx hardhat --version | ||
- name: Lint and build | ||
run: | | ||
yarn lint | ||
yarn build | ||
######################################## | ||
## Test Suite | ||
######################################## | ||
- name: Run test suite | ||
if: inputs.run-coverage-tests == false | ||
run: | | ||
echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV | ||
echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV | ||
yarn test | ||
cat testing-benchmark.json | ||
working-directory: ./packages/ethereum-contracts | ||
env: | ||
# NOTE: This is currently unset and fork tests are not being run | ||
POLYGON_MAINNET_ARCHIVE_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_ARCHIVE_PROVIDER_URL }} | ||
|
||
######################################## | ||
## Coverage Test | ||
######################################## | ||
- name: Run coverage test | ||
if: inputs.run-coverage-tests == true | ||
run: | | ||
echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV | ||
echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV | ||
yarn test-coverage | ||
working-directory: ./packages/ethereum-contracts | ||
|
||
- name: Clean up and merge coverage artifacts | ||
if: inputs.run-coverage-tests == true | ||
run: ./tasks/coverage-cleanup.sh | ||
working-directory: ./packages/ethereum-contracts | ||
|
||
- name: Create coverage artifact | ||
if: inputs.run-coverage-tests == true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ethereum-contracts-coverage | ||
path: | | ||
packages/ethereum-contracts/coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Reusable Workflow | Upload Coverage Reports | ||
|
||
on: | ||
workflow_call: | ||
|
||
|
||
jobs: | ||
upload-coverage-reports: | ||
name: Upload coverage reports | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download ethereum-contracts-coverage | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ethereum-contracts-coverage | ||
path: packages/ethereum-contracts/coverage | ||
- name: Upload ethereum-contracts-coverage to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: packages/ethereum-contracts/coverage/lcov.info | ||
name: ethereum-contracts-coverage | ||
flags: ethereum-contracts | ||
fail_ci_if_error: true | ||
|
||
- name: Download sdk-core-coverage | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: sdk-core-coverage | ||
path: packages/sdk-core/coverage | ||
- name: Upload sdk-core-coverage to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: packages/sdk-core/coverage/lcov.info | ||
name: sdk-core-coverage | ||
flags: sdk-core | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.