setup instance gh actions #17
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: Setup node env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- 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: setup latest yarn version | |
run: yarn set version 3.2.3 && yarn config set -H enableImmutableInstalls false | |
- name: Create instance | |
run: yarn cli test-hardhat --install -s hardhat | |
- name: Run hardhat node, deploy contracts (& generate contracts typescript output) | |
run: cd test-hardhat && yarn chain & cd test-hardhat && yarn deploy | |
- name: Run nextjs lint | |
run: cd test-hardhat && yarn next:lint --max-warnings=0 | |
- name: Check typings on nextjs | |
run: cd test-hardhat && yarn next:check-types | |
- name: Run hardhat lint | |
run: cd test-hardhat && yarn hardhat:lint --max-warnings=0 |