Skip to content

Commit

Permalink
Update CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Feb 21, 2024
1 parent 4525854 commit 3e1095b
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .github/checkTags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "checkTags",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
16 changes: 16 additions & 0 deletions .github/check_deprecated_line_color.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "check_deprecated_line_color",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
16 changes: 16 additions & 0 deletions .github/moparser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "moparser",
"pattern": [
{
"regexp": "^syntax\\s(error)\\son\\s\\line\\s(\\d+)\\sof\\s(.*):\\s(.*)$",
"file": 3,
"line": 2,
"severity": 1,
"message": 4
}
]
}
]
}
18 changes: 18 additions & 0 deletions .github/tidyHTML.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "tidyHTML",
"pattern": [
{
"regexp": "^File\\s\"(?:\\.\\/)?([^\"]*)\":\\sline\\s(\\d+)\\scolumn\\s(\\d+)\\s-\\s(Error|Warning|Info):\\s(.*)\\s\\((.*)\\)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
}
]
}
41 changes: 27 additions & 14 deletions .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
name: CI

on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch:

jobs:
html_documentation_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install python packages
run: |
pip install --user pytidylib
pip install --user futures
pip install --disable-pip-version-check --user pytidylib
pip install --disable-pip-version-check --user futures
- name: Build html tidy
run: |
git clone --branch 5.8.0 --depth=1 https://github.com/htacg/tidy-html5.git
Expand All @@ -28,16 +31,20 @@ jobs:
popd
sudo ldconfig
- name: Tidy html
run: python ./.CI/check_html.py tidyHTML ./
run: |
echo "::add-matcher::./.github/tidyHTML.json"
python ./.CI/check_html.py tidyHTML ./
echo "::remove-matcher owner=tidyHTML::"
- name: Check tags
run: python ./.CI/check_html.py checkTags ./
- name: Check links
run: python ./.CI/check_html.py checkLinks ./
run: |
echo "::add-matcher::./.github/checkTags.json"
python ./.CI/check_html.py checkTags ./
echo "::remove-matcher owner=checkTags::"
syntax_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Get moparser
Expand All @@ -47,17 +54,23 @@ jobs:
- name: Check for UTF-8 BOM
run: "! find . -name '*.mo' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ."
- name: Check syntax
run: ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r ExternData
run: |
echo "::add-matcher::./.github/moparser.json"
ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r ExternData
echo "::remove-matcher owner=moparser::"
deprecation_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup python environment
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Check deprecated Text.lineColor annotation
run: python ./.CI/check_deprecated_line_color.py ./
run: |
echo "::add-matcher::./.github/check_deprecated_line_color.json"
python ./.CI/check_deprecated_line_color.py ./
echo "::remove-matcher owner=check_deprecated_line_color::"

0 comments on commit 3e1095b

Please sign in to comment.