Skip to content

fix: handle invalid UNIX timestamp with TimeParserException #5419

fix: handle invalid UNIX timestamp with TimeParserException

fix: handle invalid UNIX timestamp with TimeParserException #5419

Workflow file for this run

name: PR CI
# only run tests for pull requests cause no file has to be changed without review
# open -> open the pull request
# synchronize -> push to branch of pull request
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check-uv-lockfile:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Check lockfile is consistent with pyproject.toml
run: uv lock --check
protect-changelog:
runs-on: ubuntu-24.04
if: ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-history-fix') && !startsWith(github.event.pull_request.title, 'release:') }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check if changes are limited to upcoming changes
if:
run: |
if git diff origin/main --exit-code -- CHANGELOG.md; then
echo "CHANGELOD.md not changed"
exit 0
fi
upcoming_changes=$(git diff -W origin/main -- CHANGELOG.md | grep "^ ## Upcoming Changes" -n | cut -d: -f1)
last_release=$(git diff -W origin/main -- CHANGELOG.md | grep "^ ## " -n | tail -n +2 | head -n 1 | cut -d: -f1)
# +2 to skip first line
echo "All changes should be between $upcoming_changes and $last_release"
# +6 to skip diff header
git diff -W origin/main -- CHANGELOG.md | grep "^[^ ]" -n | tail -n +6 | cut -d: -f1 \
| while read -r changed_line_nr; do
echo -n "Checking line $changed_line_nr...";
if [ $upcoming_changes -lt $changed_line_nr ] && [ $changed_line_nr -lt $last_release ]; then
echo " valid";
else
echo " invalid";
echo "Detected illegal changes"
exit 1
fi
done
test:
uses: ./.github/workflows/testing.yml
build-docs:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v6
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get -y install pandoc
- name: Install uv and sync deps
run: |
uv sync --frozen --extra doc
- name: Build docs
run: |
cd doc
uv run sphinx-apidoc -fT -o source/module_reference ../logprep
uv run make clean html
documentation-preview:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: logprep
project-language: en
platform: community
single-version: 'true'
message-template: "---\n<a name=\"readthedocs-preview\"></a>The rendered docs for this PR can be found [here]({docs-pr-index-url})."
code-quality:
uses: ./.github/workflows/code-quality.yml
secrets: inherit
with:
path: "**/*.py"
containerbuild:
uses: ./.github/workflows/container-build.yml
secrets: inherit
with:
tags: "${{ github.head_ref }}"
check-examples:
uses: ./.github/workflows/check-examples.yml