Skip to content

[infra] Switch from the test-summary action to dorny/test-reporter #8

[infra] Switch from the test-summary action to dorny/test-reporter

[infra] Switch from the test-summary action to dorny/test-reporter #8

Workflow file for this run

name: build
on:
workflow_dispatch: {}
push:
branches:
- jbion/github-build
jobs:
test-standard:
strategy:
fail-fast: false # So that all jobs run to completion even when one fails
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
name: Standard tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Create local.properties with empty credentials
shell: bash
run: |
echo "space.username=" >> local.properties
echo "space.password=" >> local.properties
- name: Run regular tests
run: ./amper test --exclude-module=amper-mobile-test
- name: Report test results
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }} # run this step even if previous step failed
with:
name: JUnit results # Name of the check run which will be created
path: build/reports/**/TEST-*.xml # Path to test results
reporter: java-junit # Format of test results
list-suites: failed
list-tests: failed
test-mobile:
strategy:
fail-fast: false # So that all jobs run to completion even when one fails
matrix:
include:
- description: Android examples
testArgs: "--include-classes=RunAndroidExamplesOnEmulatorsTestsStandalone"
os: ubuntu-latest
- description: iOS examples
testArgs: "--include-classes=RuniOSExamplesOnEmulatorsTestsStandalone"
os: macos-latest
# FIXME external projects require git credentials - maybe they should just be in our examples...
# - description: Android external projects
# testArgs: "--include-classes=RunAndroidExternalProjectsStandalone"
# os: ubuntu-latest
# - description: iOS external projects
# testArgs: "--include-classes=RuniOSExternalProjectsStandalone"
# os: macos-latest
name: Mobile tests (${{ matrix.description }})
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Create local.properties with empty credentials
shell: bash
run: |
echo "space.username=" >> local.properties
echo "space.password=" >> local.properties
- name: Run mobile tests
run: ./amper test -m amper-mobile-test ${{ matrix.testArgs }}
- name: Report test results
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }} # run this step even if previous step failed
with:
name: JUnit results # Name of the check run which will be created
path: build/reports/**/TEST-*.xml # Path to test results
reporter: java-junit # Format of test results