Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable s390x runner #270

Merged
merged 7 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions .github/actions/setup-script/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
default: "false"
required: false
description: "Collect coverage"
setup-python:
default: "true"
required: false
description: "Setup Python"
runs:
using: 'composite'
steps:
Expand All @@ -23,11 +27,12 @@ runs:
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@2bd53f9a4d1dd1cd21eaffcc01a7b91a8e73ea4c
if: ${{ inputs.setup-python == 'true' }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.12'
check-latest: true
cache: 'poetry'
cache: poetry

- name: Add python dependencies
shell: bash
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/built-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
checks: write
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
os: [ ubuntu-latest, windows-latest, macos-13, macos-14, self-hosted ]
test: [ unit, integration-example, integration-real ]
include:
- test: unit
Expand Down Expand Up @@ -109,12 +109,13 @@ jobs:
script: 'tests.py --${{ matrix.test }}'
report: 'true'
coverage: 'true'
setup-python: ${{ matrix.os != 'self-hosted' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload coverage
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.os != 'self-hosted' }}
with:
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -123,7 +124,7 @@ jobs:
verbose: true

- name: Upload test results to Codecov
if: ${{ !cancelled() && matrix.test-type == 'unit' }}
if: ${{ !cancelled() && matrix.test-type == 'unit' && matrix.os != 'self-hosted' }}
uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 # v1.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -217,7 +218,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
name: Web UI tests
flags: ui
file: ./ui/test-results.xml
files: ./ui/test-results.xml
verbose: true

build-explorer:
Expand Down
6 changes: 4 additions & 2 deletions scripts/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ def run_unit(name: str, env: dict[str, str], pargs: list[str], timeout: int):
stderr=subprocess.STDOUT,
timeout=timeout
)
stdout.check_returncode()

with open(os.path.join(unit_output_dir, f"{name}.txt"), "w", encoding="utf-8") as f:
f.write(stdout.stdout)

if stdout.returncode != 0:
raise Exception(f"Unit test {name} failed with return code {stdout.returncode}.")

generate_junit(stdout.stdout, os.path.join(get_project_root(), f"{name}.xml"))

log(f"Unit test {name} passed in {format_time(time.time() - start)}.")
Expand Down Expand Up @@ -121,7 +123,7 @@ def run_unit_tests(full: bool, wasm: bool, no_embed: bool):
"-v",
"-covermode=atomic",
"-cover",
"-coverpkg=../../...",
"-coverpkg=github.com/Zxilly/go-size-analyzer/...",
f"-test.gocoverdir={unit_path}"],
600)

Expand Down
Loading