Skip to content

Commit

Permalink
feat(ci): add ci checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tremarkley committed Nov 4, 2024
1 parent 5c18d08 commit 4066446
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Setup
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2

- name: set nx base and head ref
uses: nrwl/nx-set-shas@v4

- name: log nx base and head ref
run: |
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
shell: bash

- name: pnpm install node modules
run: pnpm i --frozen-lockfile
shell: bash

- name: pnpm build
run: pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=build
shell: bash
8 changes: 8 additions & 0 deletions .github/actions/supersim/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Supersim
runs:
using: composite
steps:
- name: Install Supersim
uses: jaxxstorm/[email protected]
with:
repo: ethereum-optimism/supersim
84 changes: 84 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Unit Tests

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: 'read'
actions: 'read'

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Run TypeChecker
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=typecheck
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Setup
uses: ./.github/actions/setup
- name: Run Linters
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=lint
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Setup
uses: ./.github/actions/setup
- name: Supersim Setup
uses: ./.github/actions/supersim
- name: Run Tests
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=test
e2e-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Setup
uses: ./.github/actions/setup
- name: Supersim Setup
uses: ./.github/actions/supersim
- name: Run E2E Tests
run: |
pnpm nx affected --base=$NX_BASE --head=$NX_HEAD --target=e2e-test

0 comments on commit 4066446

Please sign in to comment.