-
Notifications
You must be signed in to change notification settings - Fork 31
100 lines (89 loc) · 2.54 KB
/
generate.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Generate
on:
pull_request:
concurrency:
group: generate-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
changes:
name: Check changes
runs-on: ubuntu-22.04
outputs:
src: ${{ steps.changes.outputs.src}}
steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
continue-on-error: true
with:
filters: |
src:
- external/**
- tool/**
- packages/dynamite/**
- packages/nextcloud/**
dart:
name: Dart
runs-on: ubuntu-22.04
needs: changes
if: needs.changes.outputs.src != 'false'
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Submodules
run: git submodule update --init --depth 0
- name: Install dart
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1
with:
sdk: 3.5
- name: Setup
run: ./tool/setup.sh
- name: Generate dynamite end to end test
run: |
./tool/generate-dynamite-e2e-test.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
- name: Generate dynamite petstore example
run: |
./tool/generate-dynamite-petstore-example.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
- name: Generate nextcloud
run: |
./tool/generate-nextcloud.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
openapi:
name: OpenAPI
runs-on: ubuntu-22.04
needs: changes
if: needs.changes.outputs.src != 'false'
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Submodules
run: git submodule update --init --depth 0
- name: Install php
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2
with:
php-version: "8.1"
tools: composer
# Use https://github.com/kislyuk/yq
- name: Install yq
run: pip install yq
- name: Generate specs
run: |
./tool/generate-specs.sh
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi