Skip to content
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
301e103
DXE-6465 Add GithubActions workflow for unit tests
artbookspirit Mar 19, 2026
9c92a0d
DXE-6465 Fix event setup
artbookspirit Mar 19, 2026
f612581
DXE-6465 Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
artbookspirit Mar 19, 2026
95f6eb4
DXE-6465 Remove the setuptools dependency
artbookspirit Mar 19, 2026
e1f047b
DXE-6465 Remove legacy namespace package declaration
artbookspirit Mar 19, 2026
bacc830
DXE-6465 update versions of actions
artbookspirit Mar 19, 2026
ccdf62a
DXE-6465 Add nightly schedule
artbookspirit Mar 31, 2026
e446839
DXE-6465 Add the linter step
artbookspirit Mar 31, 2026
6f945f1
DXE-6465 Revert the ns declaration changes
artbookspirit Mar 31, 2026
2790889
DXE-6465 Revert removing the setuptools dependency
artbookspirit Mar 31, 2026
a037aac
DXE-6465 Remove legacy namespace package declaration
artbookspirit Mar 31, 2026
b20acc8
DXE-6465 Add test results reporting action
artbookspirit Mar 20, 2026
9f71ad4
DXE-6465 Add required checkout
artbookspirit Mar 31, 2026
ff69d69
DXE-6465 Add checks: write permissions
artbookspirit Mar 31, 2026
dea7086
DXE-6465 Update test reporter
artbookspirit Mar 31, 2026
6632c98
DXE-6465 Add code coverage summary
artbookspirit Mar 31, 2026
c2ab204
DXE-6465 Calc coverage for multiple files
artbookspirit Mar 31, 2026
a1f1369
DXE-6465 Add coverage badge
artbookspirit Mar 31, 2026
1599ee3
DXE-6465 Write to test summary
artbookspirit Mar 31, 2026
ee9dce9
DXE-6465 Remove coverage calculation
artbookspirit Mar 31, 2026
ab86e66
DXE-6465 Update .github/workflows/unit-tests.yml
artbookspirit Apr 1, 2026
fd9ddd0
DXE-6465 Update .github/workflows/unit-tests.yml
artbookspirit Apr 1, 2026
b89fea7
DXE-6465 Revert: Update .github/workflows/unit-tests.yml
artbookspirit Apr 1, 2026
ad23eed
DXE-6465 Add the master branch to on->push
artbookspirit Apr 1, 2026
4f952a9
DXE-6465 Disable allow-prereleases
artbookspirit Apr 1, 2026
08058a8
DXE-6465 Bump version of actions/download-artifact
artbookspirit Apr 1, 2026
d1c1ebc
DXE-6465 Add the workflow_dispatch trigger
artbookspirit Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Unit Tests

on:
Comment thread
wzagrajcz marked this conversation as resolved.
pull_request:
push:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we want to have the builds on push only for main branches (so effectively it'll be probably on merge, right?). Don't we want to have builds on other branches as well on push (as we currently have on Jenkin? Or are we worried about some bot spamming the branches and crowding our builds?

Copy link
Copy Markdown
Collaborator Author

@artbookspirit artbookspirit Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minimal setup that:

  1. Runs for every PR proactively (on a merge commit) for all PRs/branches
  2. Checks if long-living branches didn't break after a commit (main, master)
  3. Runs schedule on the main branch (master, right now)

I think we may expand 2. gradually, when there is a need to cover release/feature branches, for example.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand it. My point is that, in comparison to the current Jenkins pipeline, we loose ability to run builds automatically on push on any branch (currently build is run only during creation of PR)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are subtleties to discuss here so I recommend to close this thread and adjust this aspect later.

branches: [ main, master ]
schedule:
- cron: "0 3 * * *" # 03:00 UTC daily
Comment thread
mimazaka marked this conversation as resolved.
workflow_dispatch:

jobs:
test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
Comment thread
artbookspirit marked this conversation as resolved.
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install -r dev-requirements.txt

- name: Remove legacy namespace package declaration
# Temporary workaround: pkg_resources is no longer pre-installed in Python 3.12+,
# causing an import error at test collection time. This removes the legacy
# declare_namespace() call so tests can run without requiring pkg_resources.
run: sed -i "/declare_namespace/d" akamai/__init__.py

Comment thread
artbookspirit marked this conversation as resolved.
- name: Lint
run: pylint akamai

- name: Run unit tests
run: |
pytest \
--junitxml test/tests.xml \
--cov-report xml:test/coverage/cobertura-coverage.xml \
--cov=akamai
Comment thread
artbookspirit marked this conversation as resolved.

- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.python-version }}
path: test/

report:
name: Test Report
needs: test
if: always()
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download test results
uses: actions/download-artifact@v8
with:
pattern: test-results-*
merge-multiple: false

- name: Publish test report
# dorny/test-reporter v3.0.0 — pinned to SHA for supply-chain safety
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2
Comment thread
wzagrajcz marked this conversation as resolved.
with:
name: Pytest Results
path: "test-results-*/tests.xml"
reporter: java-junit
Comment thread
wzagrajcz marked this conversation as resolved.
Loading