-
Notifications
You must be signed in to change notification settings - Fork 18
81 lines (72 loc) · 2.1 KB
/
test-backend.yaml
File metadata and controls
81 lines (72 loc) · 2.1 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
name: Test backend
on:
push:
branches: [main]
paths:
- auth-center/**
- cluster-manager/**
- cs-manager/**
- event-processor/**
- history-api/**
- notifier/**
- policy-enforcer/**
- public-api/**
- runtime-monitor/**
pull_request:
paths:
- auth-center/**
- cluster-manager/**
- cs-manager/**
- event-processor/**
- history-api/**
- notifier/**
- policy-enforcer/**
- public-api/**
- runtime-monitor/**
env:
TASK_VERSION: '3.38.0'
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
auth-center: ./auth-center/**
cluster-manager: ./cluster-manager/**
cs-manager: ./cs-manager/**
event-processor: ./event-processor/**
history-api: ./history-api/**
notifier: ./notifier/**
policy-enforcer: ./policy-enforcer/**
public-api: ./public-api/**
runtime-monitor: ./runtime-monitor/**
test-backend:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.components != '[]' && needs.changes.outputs.components != '' }}
strategy:
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['notifier', 'policy-enforcer'] if both component folders contains changes
component: ${{ fromJSON(needs.changes.outputs.components) }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Task
uses: go-task/setup-task@v1
with:
version: ${{ env.TASK_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run Docker tests for ${{ matrix.component }}
working-directory: ${{ matrix.component }}
run: task test-docker