Skip to content

Commit

Permalink
Merge branch 'master' into t8ntool
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer authored Sep 13, 2024
2 parents 40638cc + 2cf4ddb commit bd9ebe1
Show file tree
Hide file tree
Showing 12 changed files with 230 additions and 140 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,12 @@ jobs:
uses: ./.github/workflows/lint.yml
with:
dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}


typecheck:
needs: [build, checkout-submodules]
uses: ./.github/workflows/typecheck.yml
with:
dep-cache-key: ${{ needs.build.outputs.dep-cache-key }}
submodule-cache-key: ${{ needs.checkout-submodules.outputs.submodule-cache-key }}


62 changes: 62 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Typecheck (tsc)
on:
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
submodule-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-typecheck
cancel-in-progress: true

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4

# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install Dependencies (if not restored from cache)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Initialize ethereum-tests
id: submodules-cache
with:
path: ${{github.workspace}}/packages/ethereum-tests
key: ${{ inputs.submodule-cache-key}}
fail-on-cache-miss: true


- run: npm run tsc --workspaces
working-directory: ${{ github.workspace }}
Loading

0 comments on commit bd9ebe1

Please sign in to comment.