-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (130 loc) · 4.12 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Mono CI
on:
push:
branches:
- develop
# Pattern matched against refs/tags
tags:
# Push events to every git tag not containing /
# NOTE: '**' would match tags with / in them, e.g. "foo/bar",
# but we want to use the tag as a docker tag as well, so it's best avoided.
- '*'
pull_request:
branches:
- '**'
# To add ready_for_review as a trigger we need to list all the defaults.
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
contents: read
pull-requests: read
# Set job outputs to values from filter step
outputs:
workspace: ${{ steps.filter.outputs.workspace }}
contracts: ${{ steps.filter.outputs.contracts }}
ipc: ${{ steps.filter.outputs.ipc }}
ipld-resolver: ${{ steps.filter.outputs.ipld-resolver }}
fendermint: ${{ steps.filter.outputs.fendermint }}
steps:
# For pull requests it's not necessary to checkout the code,
# but the workflow is also triggered on pushes to `main`.
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
workspace:
- 'Cargo.toml'
contracts:
- 'contracts/**'
ipc:
- 'ipc/**'
ipld-resolver:
- 'ipld/resolver/**'
fendermint:
- 'fendermint/**'
license:
uses: ./.github/workflows/license.yaml
contracts-prettier:
uses: ./.github/workflows/contracts-prettier.yaml
secrets: inherit
needs: [ changes ]
if: >-
needs.changes.outputs.contracts == 'true' ||
github.ref == 'refs/heads/main' ||
github.ref_type == 'tag'
contracts-deployment-test:
uses: ./.github/workflows/contracts-deployment-test.yaml
secrets: inherit
needs: [ contracts-prettier ]
contracts-test:
uses: ./.github/workflows/contracts-test.yaml
secrets: inherit
needs: [ contracts-prettier ]
contracts-storage:
uses: ./.github/workflows/contracts-storage.yaml
secrets: inherit
needs: [ contracts-prettier ]
contracts-npm-audit:
uses: ./.github/workflows/contracts-npm-audit.yaml
secrets: inherit
needs: [ contracts-prettier ]
contracts-sast:
uses: ./.github/workflows/contracts-sast.yaml
secrets: inherit
needs: [ contracts-prettier ]
extras:
uses: ./.github/workflows/extras.yaml
secrets: inherit
needs: [ contracts-prettier ]
ipc:
uses: ./.github/workflows/ipc.yaml
secrets: inherit
needs: [ changes, license ]
if: >-
needs.changes.outputs.workspace == 'true' ||
needs.changes.outputs.contracts == 'true' ||
needs.changes.outputs.ipc == 'true' ||
github.ref == 'refs/heads/main' ||
github.ref_type == 'tag'
ipld-resolver:
uses: ./.github/workflows/ipld-resolver.yaml
secrets: inherit
needs: [ changes, license ]
if: >-
needs.changes.outputs.workspace == 'true' ||
needs.changes.outputs.ipld-resolver == 'true' ||
github.ref == 'refs/heads/main' ||
github.ref_type == 'tag'
fendermint-test:
uses: ./.github/workflows/fendermint-test.yaml
secrets: inherit
needs: [ changes, license ]
if: >-
needs.changes.outputs.workspace == 'true' ||
needs.changes.outputs.contracts == 'true' ||
needs.changes.outputs.ipc == 'true' ||
needs.changes.outputs.ipld-resolver == 'true' ||
needs.changes.outputs.fendermint == 'true' ||
github.ref == 'refs/heads/main' ||
github.ref_type == 'tag'
fevm-contract-tests:
uses: ./.github/workflows/fevm-contract-tests.yaml
secrets: inherit
needs: [ changes, license ]
if: >-
needs.changes.outputs.workspace == 'true' ||
needs.changes.outputs.contracts == 'true' ||
needs.changes.outputs.ipc == 'true' ||
needs.changes.outputs.ipld-resolver == 'true' ||
needs.changes.outputs.fendermint == 'true' ||
github.ref == 'refs/heads/main' ||
github.ref_type == 'tag'