Add initial setup with hardhat and typescript #11
Workflow file for this run
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
name: Test | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install OZ contracts | |
run: forge install OpenZeppelin/openzeppelin-contracts --no-commit | |
- name: Compile contracts | |
run: forge compile --hardhat | |
working-directory: ${{ github.workspace }} | |
- name: Store contract artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: contracts-artifacts | |
path: artifacts | |
- name: Hardhat Tests | |
run: | |
yarn run test |