Skip to content

fix: CI integration test corrections #49

fix: CI integration test corrections

fix: CI integration test corrections #49

Workflow file for this run

name: CI
env:
PYTHON_VERSION: '3.12'
on:
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '.gitignore'
- 'LICENSE'
permissions:
contents: read
jobs:
# Linux-only for fast PR feedback. Full platform matrix runs post-merge in build-release.yml.
test:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Cache uv environments
uses: actions/cache@v3
with:
path: |
~/.cache/uv
~/.local/share/uv
key: ${{ runner.os }}-uv-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install dependencies
run: uv sync --extra dev
- name: Test with pytest
run: uv run pytest tests/unit tests/test_console.py
# Linux-only binary build for PR validation. Full platform builds run post-merge.
build:
name: Build APM Binary
needs: [test]
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install UPX
run: |
sudo apt-get update
sudo apt-get install -y upx-ucl
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Python dependencies
run: |
uv sync --extra dev --extra build
- name: Build binary
run: |
chmod +x scripts/build-binary.sh
uv run ./scripts/build-binary.sh
- name: Upload binary as workflow artifact
uses: actions/upload-artifact@v4
with:
name: apm-linux-x86_64
path: |
./dist/apm-linux-x86_64
./dist/apm-linux-x86_64.sha256
./scripts/test-release-validation.sh
./scripts/github-token-helper.sh
include-hidden-files: true
retention-days: 30
if-no-files-found: error