diff --git a/.github/checkTags.json b/.github/checkTags.json new file mode 100644 index 0000000..c10b620 --- /dev/null +++ b/.github/checkTags.json @@ -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 + } + ] + } + ] +} diff --git a/.github/check_deprecated_line_color.json b/.github/check_deprecated_line_color.json new file mode 100644 index 0000000..fa6b647 --- /dev/null +++ b/.github/check_deprecated_line_color.json @@ -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 + } + ] + } + ] +} diff --git a/.github/moparser.json b/.github/moparser.json new file mode 100644 index 0000000..1eaf5f5 --- /dev/null +++ b/.github/moparser.json @@ -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 + } + ] + } + ] +} diff --git a/.github/tidyHTML.json b/.github/tidyHTML.json new file mode 100644 index 0000000..0bc4a49 --- /dev/null +++ b/.github/tidyHTML.json @@ -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 + } + ] + } + ] +} diff --git a/.github/workflows/checkCI.yml b/.github/workflows/checkCI.yml index 1326fa8..f850214 100644 --- a/.github/workflows/checkCI.yml +++ b/.github/workflows/checkCI.yml @@ -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 @@ -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 @@ -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::"