-
Notifications
You must be signed in to change notification settings - Fork 14
96 lines (89 loc) · 2.35 KB
/
Copy pathui.yaml
File metadata and controls
96 lines (89 loc) · 2.35 KB
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
# Copyright Built On Envoy
# SPDX-License-Identifier: Apache-2.0
# The full text of the Apache license is available in the LICENSE file at
# the root of the repo.
name: UI
on:
push:
branches:
- main
- release/**
pull_request:
branches:
- main
- release/**
env:
GOPROXY: https://proxy.golang.org
jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: changes
with:
filters: |
code:
- 'ui/**'
predicate-quantifier: every # Make the filters be AND-ed
token: "" # don't use github api
outputs:
code: ${{ steps.changes.outputs.code }}
check:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ui
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make check
- run: make lint
test:
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ui
env:
TEST_OPTS: -race
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: make test-coverage
- uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ui
files: out/go-test-coverage.out,src/coverage/lcov.info
# Aggregate all the required jobs and make it easier to customize CI required jobs
ui-checks:
runs-on: ubuntu-latest
needs:
- check
- test
# We need this to run always to force-fail (and not skip) if any needed
# job has failed. Otherwise, a skipped job will not fail the workflow.
if: always()
steps:
- run: |
echo "CI checks completed"
[ "${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}" == "false" ] || exit 1