File: check-files.yml

package info (click to toggle)
pgrouting 4.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,332 kB
  • sloc: cpp: 21,315; sql: 10,419; ansic: 9,795; perl: 1,142; sh: 919; javascript: 314; xml: 182; makefile: 29
file content (77 lines) | stat: -rw-r--r-- 2,137 bytes parent folder | download
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
name: Check files
# This file is part of the pgRouting project.
# Copyright (c) 2020-2026 pgRouting developers
# License: GPL-2 See https://github.com/pgRouting/pgrouting/blob/main/LICENSE

# Makes a general check on the files
# Verifies:
# - the signatures are up-to-date
# - the release_notes and NEWS are consitent
# - the C/C++ files have a license
# - the shell scripts are ok
# - the code style is ok
# Does not makes a compilation

on: [push, pull_request]

permissions:
  contents: read

jobs:
  Signature_check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6
      - name: Signatures are not removed
        run: |
          tools/scripts/test_signatures.sh

  News_check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: News file up to date
        run: |
          tools/release-scripts/notes2news.pl
          if git status | grep 'NEWS.md'; then echo "NEWS.md is not up to date"; exit 1; fi
          if ! grep -q $(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt) NEWS.md; then echo "Missing section in NEWS.md"; exit 1; fi

  License_check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Install Requirements
        run: |
          sudo apt install -y licensecheck
      - name: Run License Check
        run: ./tools/scripts/test_license.sh

  Shell_check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Install Requirements
        run: |
          sudo apt install -y shellcheck
      - name: Run Shell Check
        run: ./tools/scripts/test_shell.sh

  style-check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Checkout cpplint
        uses: actions/checkout@v6
        with:
          repository: 'cpplint/cpplint'
          ref: "develop"
          path: "code_linter/cpplint"
      - name: Run linter
        run: |
          ls code_linter
          bash ./tools/scripts/code_checker.sh