This repository was archived by the owner on Jan 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -52,23 +52,42 @@ jobs:
52
52
- name : Checkout repository
53
53
uses : actions/checkout@v3
54
54
55
+ - name : Check change in source files
56
+ id : changed_source
57
+ uses :
tj-actions/[email protected]
58
+ with :
59
+ files : |
60
+ Sources/**/*
61
+ Tests/**/*
62
+ Package*.swift
63
+ .github/actions/setup/action.yml
64
+ .github/workflows/main.yml
65
+
55
66
- name : Setup repository
67
+ if : steps.changed_source.outputs.any_changed == 'true'
56
68
uses : ./.github/actions/setup
57
69
with :
58
70
swift : ${{ matrix.swift }}
59
71
60
72
- name : Run tests
73
+ if : steps.changed_source.outputs.any_changed == 'true'
61
74
run : npm run test
62
75
63
76
- name : Swift Coverage Report
64
- if : matrix.swift == '5.6' && github.event_name == 'push'
77
+ if : |
78
+ steps.changed_source.outputs.any_changed == 'true' &&
79
+ matrix.swift == '5.6' &&
80
+ github.event_name == 'push'
65
81
66
82
with :
67
83
file-format : lcov
68
84
output-file : ./coverage.lcov
69
85
70
86
- name : Codecov upload
71
- if : matrix.swift == '5.6' && github.event_name == 'push'
87
+ if : |
88
+ steps.changed_source.outputs.any_changed == 'true' &&
89
+ matrix.swift == '5.6' &&
90
+ github.event_name == 'push'
72
91
73
92
with :
74
93
token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments