Skip to content

Replace Makefile with turborepo #3141

Replace Makefile with turborepo

Replace Makefile with turborepo #3141

Workflow file for this run

name: ci
on:
push:
branches: [main, "v*"]
tags: ["v*"]
pull_request:
branches: [main, "v*"]
workflow_dispatch:
permissions:
contents: read
env:
# https://consoledonottrack.com/
DO_NOT_TRACK: 1
jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/format/${{ github.sha }}
restore-keys: connect-es/format
- name: NPM Install
run: npm ci
- name: Format
run: npx turbo run format
- name: Check changed files
run: node scripts/gh-diffcheck.js
license-header:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/license-header/${{ github.sha }}
restore-keys: connect-es/license-header
- name: NPM Install
run: npm ci
- name: Update license headers
run: npx turbo run license-header
- name: Check changed files
run: node scripts/gh-diffcheck.js
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/lint/${{ github.sha }}
restore-keys: connect-es/lint
- name: NPM Install
run: npm ci
- name: lint
run: npx turbo run lint
attw:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/attw/${{ github.sha }}
restore-keys: connect-es/attw
- name: NPM Install
run: npm ci
- name: Are the types wrong
run: npx turbo run attw
bundle-size:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/bundle-size/${{ github.sha }}
restore-keys: connect-es/bundle-size
- name: NPM Install
run: npm ci
- name: Bundle size
run: npx turbo run bundle-size
- name: Check changed files
run: node scripts/gh-diffcheck.js
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/build/${{ github.sha }}
restore-keys: connect-es/build
- name: NPM Install
run: npm ci
- name: build
run: npx turbo run build
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Node.js v16 does not provide all necessary fetch types by default, so
# we cannot run tests for @connectrpc/connect-web.
# v16 is tested in a separate job below.
node-version: [21.1.0, 20.9.0, 18.16.0]
name: "Node.js ${{ matrix.node-version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/test/${{ github.sha }}
restore-keys: connect-es/test
- name: NPM Install
run: npm ci
- name: Run
run: npx turbo run test
test16:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
node-version: [16.20.0]
name: "Node.js ${{ matrix.node-version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache@v4
with:
path: .turbo
key: connect-es/test/${{ github.sha }}
restore-keys: connect-es/test
- name: NPM Install
run: npm ci
- name: "Run, excluding @connectrpc/connect-web"
run: npx turbo run test --filter '!@connectrpc/connect-web'