{"id":13794693,"url":"https://github.com/foundry-rs/foundry-toolchain","last_synced_at":"2025-05-15T03:05:40.221Z","repository":{"id":40407101,"uuid":"448072613","full_name":"foundry-rs/foundry-toolchain","owner":"foundry-rs","description":"GitHub action to install Foundry","archived":false,"fork":false,"pushed_at":"2025-04-24T11:07:51.000Z","size":3509,"stargazers_count":242,"open_issues_count":7,"forks_count":107,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-11T07:35:02.652Z","etag":null,"topics":["dapptools","ethereum","foundry","solidity","solidity-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foundry-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-14T18:42:14.000Z","updated_at":"2025-05-10T12:04:50.000Z","dependencies_parsed_at":"2023-12-09T04:22:38.060Z","dependency_job_id":"a7d0909a-d420-4f9e-9ac3-da4421d90835","html_url":"https://github.com/foundry-rs/foundry-toolchain","commit_stats":{"total_commits":38,"total_committers":11,"mean_commits":"3.4545454545454546","dds":0.631578947368421,"last_synced_commit":"8f1998e9878d786675189ef566a2e4bf24869773"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundry-rs%2Ffoundry-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundry-rs%2Ffoundry-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundry-rs%2Ffoundry-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundry-rs%2Ffoundry-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundry-rs","download_url":"https://codeload.github.com/foundry-rs/foundry-toolchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264765,"owners_count":22041793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dapptools","ethereum","foundry","solidity","solidity-testing"],"created_at":"2024-08-03T23:00:46.193Z","updated_at":"2025-05-15T03:05:40.205Z","avatar_url":"https://github.com/foundry-rs.png","language":"JavaScript","funding_links":[],"categories":["Tools","JavaScript","TypeScript"],"sub_categories":["CI/CD"],"readme":"## `foundry-toolchain` Action\n\nThis GitHub Action installs [Foundry](https://github.com/foundry-rs/foundry), the blazing fast, portable and modular\ntoolkit for Ethereum application development.\n\n### Example workflow\n\n```yml\non: [push]\n\nname: test\n\njobs:\n  check:\n    name: Foundry project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Install Foundry\n        uses: foundry-rs/foundry-toolchain@v1\n\n      - name: Run tests\n        run: forge test -vvv\n\n      - name: Run snapshot\n        run: forge snapshot\n```\n\n### Inputs\n\n| **Name**             | **Required** | **Default**                           | **Description**                                                 | **Type** |\n| -------------------- | ------------ | ------------------------------------- | --------------------------------------------------------------- | -------- |\n| `cache`              | No           | `true`                                | Whether to cache RPC responses or not.                          | bool     |\n| `version`            | No           | `stable`                              | Version to install, e.g. `stable`, `rc`, `nightly` or `v0.3.0`. | string   |\n| `cache-key`          | No           | `${{ github.job }}-${{ github.sha }}` | The cache key to use for caching.                               | string   |\n| `cache-restore-keys` | No           | `[${{ github.job }}-]`                | The cache keys to use for restoring the cache.                  | string[] |\n\n### RPC Caching\n\nBy default, this action matches Forge's behavior and caches all RPC responses in the `~/.foundry/cache/rpc` directory.\nThis is done to speed up the tests and avoid hitting the rate limit of your RPC provider.\n\nThe logic of the caching is as follows:\n\n- Always load the latest valid cache, and always create a new one with the updated cache.\n- When there are no changes to the fork tests, the cache does not change but the key does, since the key is based on the\n  commit hash.\n- When the fork tests are changed, both the cache and the key are updated.\n\nIf you would like to disable the caching (e.g. because you want to implement your own caching mechanism), you can set\nthe `cache` input to `false`, like this:\n\n```yml\n- name: Install Foundry\n  uses: foundry-rs/foundry-toolchain@v1\n  with:\n    cache: false\n```\n\n### Custom Cache Keys\n\nYou have the ability to define custom cache keys by utilizing the `cache-key` and `cache-restore-keys` inputs. This\nfeature is particularly beneficial when you aim to tailor the cache-sharing strategy across multiple jobs. It is\nimportant to ensure that the `cache-key` is unique for each execution to prevent conflicts and guarantee successful\ncache saving.\n\nFor instance, if you wish to utilize a shared cache between two distinct jobs, the following configuration can be\napplied:\n\n```yml\n- name: Install Foundry\n  uses: foundry-rs/foundry-toolchain@v1\n  with:\n    cache-key: custom-seed-test-${{ github.sha }}\n    cache-restore-keys: |-\n      custom-seed-test-\n      custom-seed-\n---\n- name: Install Foundry\n  uses: foundry-rs/foundry-toolchain@v1\n  with:\n    cache-key: custom-seed-coverage-${{ github.sha }}\n    cache-restore-keys: |-\n      custom-seed-coverage-\n      custom-seed-\n```\n\n#### Deleting Caches\n\nYou can delete caches via the GitHub Actions user interface. Just go to your repo's \"Actions\" page:\n\n```text\nhttps://github.com/\u003cOWNER\u003e/\u003cREPO\u003e/actions/caches\n```\n\nThen, locate the \"Management\" section, and click on \"Caches\". You will see a list of all of your current caches, which\nyou can delete by clicking on the trash icon.\n\nFor more detail on how to delete caches, read GitHub's docs on\n[managing caches](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches).\n\n#### Fuzzing\n\nNote that if you are fuzzing in your fork tests, the RPC cache strategy above will not work unless you set a\n[fuzz seed](https://book.getfoundry.sh/reference/config/testing#seed). You might also want to reduce your number of RPC\ncalls by using [Multicall](https://github.com/mds1/multicall).\n\n### Summaries\n\nYou can add the output of Forge and Cast commands to GitHub step summaries. The summaries support GitHub flavored\nMarkdown.\n\nFor example, to add the output of `forge snapshot` to a summary, you would change the snapshot step to:\n\n```yml\n- name: Run snapshot\n  run: NO_COLOR=1 forge snapshot \u003e\u003e $GITHUB_STEP_SUMMARY\n```\n\nSee the official\n[GitHub docs](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary)\nfor more information.\n\n### Building\n\nWhen opening a PR, you must build the action exactly following the below steps for CI to pass:\n\n```console\n$ npm ci\n$ npm run build\n```\n\nYou **have** to use Node.js 20.x.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundry-rs%2Ffoundry-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundry-rs%2Ffoundry-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundry-rs%2Ffoundry-toolchain/lists"}