-
-
Notifications
You must be signed in to change notification settings - Fork 7
91 lines (84 loc) · 2.86 KB
/
periodic-checks.yml
File metadata and controls
91 lines (84 loc) · 2.86 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
---
# SPDX-FileCopyrightText: NONE
# SPDX-License-Identifier: CC0-1.0
name: "Periodic checks"
permissions: {}
on:
push:
paths:
- "gradle/wrapper/gradle-wrapper.jar"
- "**codecov.yml"
- "Makefile"
pull_request:
paths:
- "gradle/wrapper/gradle-wrapper.jar"
- "**codecov.yml"
- "Makefile"
schedule:
# At 03:00 AM, every 30 days (UTC)
- cron: "0 3 */30 * *"
workflow_dispatch:
jobs:
base-job:
name: "Base"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read # Needed to checkout the repository (only required for private repositories)
steps:
- name: "Checkout sources"
uses: actions/checkout@v6
- name: "Validate Gradle Wrapper"
uses: gradle/actions/wrapper-validation@v5
- name: "Validate Codecov configuration"
shell: bash
run: |
# Validating Codecov configuration
codecovyml_path='${{ github.workspace }}/.codecov.yml'
if test -f "${codecovyml_path}"; then
status='0'
# NOSONAR_BEGIN
wget -qO- --post-file "${codecovyml_path:?}" https://codecov.io/validate || status="${?}"
# NOSONAR_END
if test "${status:?}" -eq 0; then echo 'Result: pass'; else echo 'Result: fail'; exit "${status:?}"; fi
fi
codecovyml_path='${{ github.workspace }}/codecov.yml'
if test -f "${codecovyml_path}"; then
status='0'
# NOSONAR_BEGIN
wget -qO- --post-file "${codecovyml_path:?}" https://codecov.io/validate || status="${?}"
# NOSONAR_END
if test "${status:?}" -eq 0; then echo 'Result: pass'; else echo 'Result: fail'; exit "${status:?}"; fi
fi
makefile-validation:
name: "Validate makefile"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read # Needed to checkout the repository (only required for private repositories)
steps:
- name: "Checkout sources"
uses: actions/checkout@v6
- name: "Validation"
uses: Uno-Takashi/checkmake-action@v2
with:
makefile: "Makefile"
dep5-validation:
name: "Validate dep5"
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read # Needed to checkout the repository (only required for private repositories)
steps:
- name: "Checkout sources"
uses: actions/checkout@v6
- name: "Validation"
shell: bash
run: |
# Validating dep5
if ! test -e './.reuse/dep5'; then exit 0; fi
sudo apt-get -qq update
sudo apt-get -qq -y install cme 1> /dev/null
status='0'
cme check dpkg-copyright -file './.reuse/dep5' || status="${?}"
if test "${status:?}" -eq 0; then echo 'Result: pass'; else echo 'Result: fail'; exit "${status:?}"; fi