Change version number (#306) #1060
This file contains hidden or 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
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| forge-test: | |
| name: Run Forge Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.1 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Initialize submodules | |
| run: git submodule update --init --recursive | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # pin @v1.8.0 | |
| - name: Cache Foundry build output | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # pin@v5.0.3 | |
| with: | |
| path: | | |
| foundry-out | |
| cache | |
| key: ${{ runner.os }}-foundry-${{ hashFiles('foundry.lock', 'foundry.toml') }} | |
| - name: Run Forge tests | |
| run: forge test -vvv | |
| package-check: | |
| name: Package build (v3) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # pin@v6.3.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --network-concurrency 1 | |
| - name: Build dist files | |
| run: yarn build | |
| - name: Pack NPM package | |
| run: npm pack --dry-run | |
| # Satisfy legacy required checks from main branch protection until rulesets are updated for v3. | |
| readme: | |
| name: Check README.md is contained in each contracts directory | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.1 | |
| - run: sh readmecheck.sh | |
| slither: | |
| name: Run slither | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.1 | |
| with: | |
| submodules: recursive | |
| - run: sudo apt-get update && sudo apt-get install -y python3-pip | |
| - name: Uninstall Debian package that blocks Slither pip install | |
| run: sudo apt remove -y python3-typing-extensions | |
| - run: sudo pip3 install slither-analyzer | |
| - uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # pin @v1.8.0 | |
| - run: slither --compile-force-framework forge --foundry-out-directory foundry-out . |