-
Notifications
You must be signed in to change notification settings - Fork 23
67 lines (66 loc) · 2.04 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches: [main, v2]
pull_request:
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-20.04
permissions:
pull-requests: read
outputs:
projects: ${{ steps.filter.outputs.changes }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
buf-ng: angular/**
buf-astro: astro/**
buf-express: express/**
buf-fastify: fastify/**
buf-nextjs: nextjs/**
buf-plain: plain/**
buf-esbuild: react/esbuild/**
buf-parcel: react/parcel/**
buf-rollup: react/rollup/**
buf-vite: react/vite/**
buf-webpack: react/webpack/**
buf-webpack-cjs: react/webpack-cjs/**
buf-react-native: react-native/**
buf-remix: remix/**
buf-svelte: svelte/**
buf-vanilla-node: vanilla-node/**
buf-vue: vue/**
buf-cloudflare-workers: cloudflare-workers/**
buf-custom-client: custom-client/**
bundle-size: bundle-size/**
ci:
needs: changes
if: ${{ needs.changes.outputs.projects != '' && toJson(fromJson(needs.changes.outputs.projects)) != '[]' }}
strategy:
matrix:
project: ${{ fromJSON(needs.changes.outputs.projects) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
# Slightly fragile since it runs on the default node version
# but until setup-node supports corepack (https://github.com/actions/setup-node/issues/531)
# this is our best option
- name: Enable core pack
run: |
corepack enable
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Run CI
run: node manage.mjs ci ${{ matrix.project }}
- name: Check Diff
id: checkdiff
run: |
[[ -z $(git status --porcelain | tee /dev/stderr) ]] || exit 1