From 2cf384b2e1b95fbfad0574dc48307cd4cc25b7a4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:47:16 +0000 Subject: [PATCH 1/3] Update workflow actions and Python setup Agent-Logs-Url: https://github.com/Sp3EdeR/huroutes/sessions/7c6d4b80-c8d7-431e-9b9d-b958b6dd0df5 Co-authored-by: Sp3EdeR <22780322+Sp3EdeR@users.noreply.github.com> --- .github/actions/build-website/action.yml | 35 +++++++------- .github/workflows/deploy-pr-preview.yml | 14 ++++-- .github/workflows/deploy-website-build.yml | 14 ++++-- .github/workflows/huroutes-static-tests.yml | 53 +++++++++++---------- 4 files changed, 65 insertions(+), 51 deletions(-) diff --git a/.github/actions/build-website/action.yml b/.github/actions/build-website/action.yml index ea1539a..e14c383 100644 --- a/.github/actions/build-website/action.yml +++ b/.github/actions/build-website/action.yml @@ -1,20 +1,21 @@ name: 'Build huroutes' description: 'Builds the huroutes website from source' -runs: - using: 'composite' - steps: - - name: Minify the website code - shell: bash - run: | - sudo pip install minify-html==0.15.0 - sudo pip install rjsmin==1.2.3 - sudo pip install rcssmin==1.2.0 - sudo pip install lxml==5.3.0 - python ".github/scripts/optimize-site.py" . +runs: + using: 'composite' + steps: + - name: Set up isolated Python environment + shell: bash + run: | + python -m venv "$RUNNER_TEMP/huroutes-build-venv" + "$RUNNER_TEMP/huroutes-build-venv/bin/python" -m pip install --disable-pip-version-check minify-html==0.15.0 rjsmin==1.2.3 rcssmin==1.2.0 lxml==5.3.0 kml2geojson==5.1.0 + echo "HUROUTES_BUILD_PYTHON=$RUNNER_TEMP/huroutes-build-venv/bin/python" >> "$GITHUB_ENV" + - name: Minify the website code + shell: bash + run: | + "$HUROUTES_BUILD_PYTHON" ".github/scripts/optimize-site.py" . - name: Download curves data - # This step downloads and converts autogenerated curvature data for a map overlay. - # The script supports processing KMZ files provided by kml.roadcurvature.com. "Curve" KMZ format is not supported. - shell: bash - run: | - sudo pip install kml2geojson==5.1.0 - python ".github/scripts/get-curve-map.py" "https://kml.roadcurvature.com/europe/hungary.c_1000.kmz" "map/curves.geo.json" "map/curves-style.json" + # This step downloads and converts autogenerated curvature data for a map overlay. + # The script supports processing KMZ files provided by kml.roadcurvature.com. "Curve" KMZ format is not supported. + shell: bash + run: | + "$HUROUTES_BUILD_PYTHON" ".github/scripts/get-curve-map.py" "https://kml.roadcurvature.com/europe/hungary.c_1000.kmz" "map/curves.geo.json" "map/curves-style.json" diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 61f129b..43c60ab 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -14,12 +14,16 @@ jobs: deploy-pr-preview: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build the website - uses: ./.github/actions/build-website + - name: Checkout + uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Build the website + uses: ./.github/actions/build-website - name: Deploy uses: rossjrw/pr-preview-action@v1 with: source-dir: . - umbrella-dir: pr \ No newline at end of file + umbrella-dir: pr diff --git a/.github/workflows/deploy-website-build.yml b/.github/workflows/deploy-website-build.yml index 4f773cf..72c0b72 100644 --- a/.github/workflows/deploy-website-build.yml +++ b/.github/workflows/deploy-website-build.yml @@ -14,12 +14,16 @@ jobs: deploy-website: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build the website - uses: ./.github/actions/build-website + - name: Checkout + uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Build the website + uses: ./.github/actions/build-website - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: clean-exclude: pr/ - folder: . \ No newline at end of file + folder: . diff --git a/.github/workflows/huroutes-static-tests.yml b/.github/workflows/huroutes-static-tests.yml index b10f414..c8c9616 100644 --- a/.github/workflows/huroutes-static-tests.yml +++ b/.github/workflows/huroutes-static-tests.yml @@ -13,15 +13,20 @@ jobs: test-db: # Validates the huroutes route database if: ${{ github.event_name != 'schedule' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Ensure the jsonschema lib - run: sudo pip install jsonschema - - name: Run the check - run: python ".github/scripts/validate-database.py" data.json data.schema.json - codeql: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Run the check + run: | + python -m venv "$RUNNER_TEMP/huroutes-test-venv" + "$RUNNER_TEMP/huroutes-test-venv/bin/python" -m pip install --disable-pip-version-check jsonschema + "$RUNNER_TEMP/huroutes-test-venv/bin/python" ".github/scripts/validate-database.py" data.json data.schema.json + codeql: # Runs CodeQL checks on javascript source code name: Analyze runs-on: ubuntu-latest @@ -29,18 +34,18 @@ jobs: actions: read contents: read security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - steps: - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - name: Checkout - uses: actions/checkout@v3 - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v4 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 From e11d2e8fb543ddcf3da7915032cad226a5887042 Mon Sep 17 00:00:00 2001 From: Speeder Date: Sun, 12 Apr 2026 11:03:20 +0200 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/huroutes-static-tests.yml | 58 ++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/huroutes-static-tests.yml b/.github/workflows/huroutes-static-tests.yml index c8c9616..b08ef5f 100644 --- a/.github/workflows/huroutes-static-tests.yml +++ b/.github/workflows/huroutes-static-tests.yml @@ -13,20 +13,20 @@ jobs: test-db: # Validates the huroutes route database if: ${{ github.event_name != 'schedule' }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: '3.x' - - name: Run the check - run: | - python -m venv "$RUNNER_TEMP/huroutes-test-venv" - "$RUNNER_TEMP/huroutes-test-venv/bin/python" -m pip install --disable-pip-version-check jsonschema - "$RUNNER_TEMP/huroutes-test-venv/bin/python" ".github/scripts/validate-database.py" data.json data.schema.json - codeql: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Run the check + run: | + python -m venv "$RUNNER_TEMP/huroutes-test-venv" + "$RUNNER_TEMP/huroutes-test-venv/bin/python" -m pip install --disable-pip-version-check jsonschema + "$RUNNER_TEMP/huroutes-test-venv/bin/python" ".github/scripts/validate-database.py" data.json data.schema.json + codeql: # Runs CodeQL checks on javascript source code name: Analyze runs-on: ubuntu-latest @@ -34,18 +34,18 @@ jobs: actions: read contents: read security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v4 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v4 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 From 5d37fc4099e9d64c2035f848ba940c29279f9112 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 09:08:57 +0000 Subject: [PATCH 3/3] Pin workflow Python version to 3.12 Agent-Logs-Url: https://github.com/Sp3EdeR/huroutes/sessions/1b7d3a9a-3374-460b-8ee4-b66235ad823d Co-authored-by: Sp3EdeR <22780322+Sp3EdeR@users.noreply.github.com> --- .github/workflows/deploy-pr-preview.yml | 2 +- .github/workflows/deploy-website-build.yml | 2 +- .github/workflows/huroutes-static-tests.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 43c60ab..8a23636 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.x' + python-version: '3.12' - name: Build the website uses: ./.github/actions/build-website - name: Deploy diff --git a/.github/workflows/deploy-website-build.yml b/.github/workflows/deploy-website-build.yml index 72c0b72..a945e29 100644 --- a/.github/workflows/deploy-website-build.yml +++ b/.github/workflows/deploy-website-build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.x' + python-version: '3.12' - name: Build the website uses: ./.github/actions/build-website - name: Deploy diff --git a/.github/workflows/huroutes-static-tests.yml b/.github/workflows/huroutes-static-tests.yml index b08ef5f..0d38ae6 100644 --- a/.github/workflows/huroutes-static-tests.yml +++ b/.github/workflows/huroutes-static-tests.yml @@ -17,10 +17,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: '3.x' + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.12' - name: Run the check run: | python -m venv "$RUNNER_TEMP/huroutes-test-venv"