CI #4119
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: CI | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "packages/**" | |
- "package.json" | |
pull_request: | |
types: [opened, synchronize] | |
paths: | |
- "packages/**" | |
- "package.json" | |
- ".github/**" | |
# trigger on merge group as well (merge queue) | |
merge_group: | |
types: [checks_requested] | |
branches: ["main"] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# To use Remote Caching, uncomment the next lines and follow the steps below. | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build Packages | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
- name: Build Packages | |
run: pnpm build:packages | |
lint: | |
timeout-minutes: 15 | |
name: Lint Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
- name: Setup Biome | |
uses: biomejs/setup-biome@v2 | |
with: | |
version: latest | |
- run: pnpm lint | |
test: | |
timeout-minutes: 15 | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
- name: Set up foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
cache: false | |
- run: pnpm test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: packages/ | |
flags: packages | |
verbose: true | |
e2e: | |
timeout-minutes: 15 | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
# TODO actually run e2e tests | |
benchmark: | |
# cannot run benchmarks on merge group | |
if: github.event_name != 'merge_group' | |
timeout-minutes: 15 | |
name: "Benchmarks" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
- name: Set up foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
cache: false | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v2 | |
with: | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
run: "pnpm bench" | |
size: | |
# only run on pull requests | |
if: github.event_name == 'pull_request' | |
timeout-minutes: 15 | |
name: "Size" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup & Install | |
uses: ./.github/composite-actions/install | |
- name: Report bundle size | |
uses: andresz1/size-limit-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
package_manager: pnpm | |
directory: packages/thirdweb |