Skip to content

Replace Makefile with turborepo #3142

Replace Makefile with turborepo

Replace Makefile with turborepo #3142

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: ${{ runner.os }}/format/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/license-header/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/lint/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/attw/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/bundle-size/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/build/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/test/${{ github.sha }}
restore-keys: ${{ runner.os }}/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: ${{ runner.os }}/test/${{ github.sha }}
restore-keys: ${{ runner.os }}/test
- name: NPM Install
run: npm ci
- name: "Run, excluding @connectrpc/connect-web"
run: npx turbo run test --filter '!@connectrpc/connect-web'