🧪 trying optimizing push checks #26
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 workflow | |
on: push | |
jobs: | |
setup_dependencies: | |
name: Setup Dependencies | |
runs-on: ubuntu-latest | |
outputs: | |
cache-key: ${{ steps.cache-dependencies.outputs.cache-key }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: cache-dependencies | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
lint: | |
name: Lint sources | |
runs-on: ubuntu-latest | |
needs: setup_dependencies | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ needs.setup_dependencies.outputs.cache-key }} | |
- name: Lint sources | |
run: yarn lint:sol | |
unit_test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
needs: setup_dependencies | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ needs.setup_dependencies.outputs.cache-key }} | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install foundry dependencies | |
run: forge install | |
- name: Build Typechain and Foundry | |
run: yarn build | |
- name: Run Forge and Hardhat Tests | |
run: yarn test |