feat: add required extensions (#54) #59
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
on: [push] | |
name: test | |
jobs: | |
check: | |
name: Foundry project | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install Node.js 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('contracts/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache node_modules | |
id: npm_cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: node_modules-${{ hashFiles('contracts/yarn.lock') }} | |
- name: yarn install | |
# if: steps.npm_cache.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: Compile with foundry | |
run: forge build | |
- name: Run foundry tests | |
run: forge test -vvv | |