Academy/milestone6 #13
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: Static Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
workflow_dispatch: {} | |
jobs: | |
codestyle: | |
runs-on: ubuntu-latest | |
env: | |
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
ETHERSCAN_API: ${{ secrets.ETHERSCAN_API }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-npm- | |
- name: Install project dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Test contracts | |
run: yarn codestyle | |
test: | |
runs-on: ubuntu-latest | |
env: | |
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
ETHERSCAN_API: ${{ secrets.ETHERSCAN_API }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-npm- | |
- name: Install project dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Test contracts | |
run: yarn test |