Skip to content

Commit

Permalink
🧪 trying optimizing push checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Nov 8, 2023
1 parent 46da316 commit f27c51b
Showing 1 changed file with 45 additions and 16 deletions.
61 changes: 45 additions & 16 deletions .github/workflows/push_check.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,78 @@
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@main'
uses: actions/checkout@v3

- name: Set Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Create a fake .secret file
run: echo "primary twist rack vendor diagram image used route theme frown either will" > .secret
- name: Install dependencies
run: yarn install --frozen-lockfile && yarn build

- 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
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@main"
uses: actions/checkout@v3

- name: Set Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Create a fake .secret file
run: echo "primary twist rack vendor diagram image used route theme frown either will" > .secret
- 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
Expand All @@ -50,11 +82,8 @@ jobs:
- name: Install foundry dependencies
run: forge install

- name: Install hardhat dependencies
run: yarn install --frozen-lockfile

- name: Build Typechain and Foundry
run: yarn build

- name: Run Forge and Hardhat Tests
run: yarn test
run: yarn test

0 comments on commit f27c51b

Please sign in to comment.