Skip to content

chore: update to Amper 0.11.0-dev-3922 and migrate to new product typ… #20

chore: update to Amper 0.11.0-dev-3922 and migrate to new product typ…

chore: update to Amper 0.11.0-dev-3922 and migrate to new product typ… #20

Workflow file for this run

name: 🔨 Build & Test
on:
push:
branches: [ main ]
paths-ignore:
- "*.md"
- "docs/**"
- LICENSE
pull_request:
branches: [ main ]
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AMPER_BOOTSTRAP_CACHE_DIR: ${{ github.workspace }}/.amper/boot-cache
AMPER_SHARED_CACHE_DIR: ${{ github.workspace }}/.amper/shared-cache
permissions:
contents: write
jobs:
build:
name: 🔨 Build & Test
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v6
- name: ⚡ Cache Amper bootstrap
uses: actions/cache@v5
with:
path: ${{ env.AMPER_BOOTSTRAP_CACHE_DIR }}
key: amper-boot-${{ runner.os }}-${{ hashFiles('amper', 'amper.bat') }}
- name: 🛠️ Cache toolchains & JDKs
uses: actions/cache@v5
with:
path: |
${{ env.AMPER_SHARED_CACHE_DIR }}/download.cache
${{ env.AMPER_SHARED_CACHE_DIR }}/extract.cache
key: amper-shared-downloads-${{ runner.os }}-${{ hashFiles('module.yaml', 'amper', 'amper.bat', 'libs.versions.toml') }}
restore-keys: |
amper-shared-downloads-${{ runner.os }}-
- name: 📦 Cache Maven & Kotlin dependencies
uses: actions/cache@v5
with:
path: |
${{ env.AMPER_SHARED_CACHE_DIR }}/.m2.cache
${{ env.AMPER_SHARED_CACHE_DIR }}/kotlin
enableCrossOsArchive: true
key: amper-shared-deps-${{ hashFiles('module.yaml', 'amper', 'amper.bat', 'libs.versions.toml') }}
restore-keys: |
amper-shared-deps-
- name: 🧪 Test
run: ./amper test
- name: 📄 Generate HTML Report
if: always()
env:
REPORT_DIR: build/reports/certkit/jvm
run: |
curl -sLO https://repo1.maven.org/maven2/org/opentest4j/reporting/open-test-reporting-cli/0.2.5/open-test-reporting-cli-0.2.5-standalone.jar
java -jar open-test-reporting-cli-0.2.5-standalone.jar html-report "$REPORT_DIR/open-test-report.xml"
mv "$REPORT_DIR/open-test-report.html" build/reports/index.html
- name: 🚀 Publish to GitHub Pages
if: always() && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
branch: gh-pages
folder: build/reports
target-folder: reports
clean: true
commit-message: 'test: Deployed test report'
- name: 🔭 Upload build traces
if: always()
uses: actions/upload-artifact@v7
with:
name: amper-traces
path: build/logs/**/telemetry/amper_cli_traces.jsonl
if-no-files-found: ignore