setup instance gh actions #9
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-hardhat: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [lts/*] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Setup node env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: setup latest yarn version | |
run: yarn set version latest | |
- name: Set up Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Create instance | |
run: yarn cli test-hardhat --skip-install -s hardhat | |
- name: cd into dir and yarn install | |
run: cd test-hardhat && yarn install | |
- name: Run hardhat node, deploy contracts (& generate contracts typescript output) | |
run: yarn chain & yarn deploy | |
- name: Run nextjs lint | |
run: yarn next:lint --max-warnings=0 | |
- name: Check typings on nextjs | |
run: yarn next:check-types | |
- name: Run hardhat lint | |
run: yarn hardhat:lint --max-warnings=0 |