Skip to content

Run tests

Run tests #94

Workflow file for this run

---
name: Run tests
on:
workflow_dispatch:
inputs:
os:
description: 'Runs on'
required: false
type: string
default: 'ubuntu-22.04 macos-12 windows-2022'
targets:
description: 'Test targets'
required: false
type: string
default: 'core swig-py swig-pl swig-rb javahl'
subversion:
description: 'Subversion (owner/repo@ref or URL-to-tarball)'
required: true
default: 'apache/subversion@trunk'
dependencies:
required: true
default: 'py3c=v1.4 apr=1.7.4 apr-util=1.6.3 httpd=2.4.58 serf=1.3.10 junit=4.13.2'
jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 15
outputs:
ubuntu: ${{ steps.convert.outputs.ubuntu }}
macos: ${{ steps.convert.outputs.macos }}
windows: ${{ steps.convert.outputs.windows }}
targets: ${{ steps.convert.outputs.targets }}
subversion: ${{ steps.convert.outputs.subversion }}
dependencies: ${{ steps.convert.outputs.dependencies }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Convert inputs to json outputs
id: convert
env:
INPUTS: ${{ toJSON(inputs) }}
run: ./convert.sh
- name: Cache Subversion archives
if: ${{ steps.convert.outputs.subversion &&
fromJson(steps.convert.outputs.subversion).archive }}
uses: actions/cache@v3
with:
path: arc
enableCrossOsArchive: true
key: arc--${{ fromJson(steps.convert.outputs.subversion).archive }}
restore-keys: |
arc--${{ fromJson(steps.convert.outputs.subversion).archive }}
arc--
- name: Cache junit jar file
if: ${{ steps.convert.outputs.targets &&
contains(fromJson(steps.convert.outputs.targets), 'javahl') }}
uses: actions/cache@v3
with:
path: arc
enableCrossOsArchive: true
key: arc--junit-${{ fromJson(steps.convert.outputs.dependencies).junit }}
restore-keys: |
arc--junit-${{ fromJson(steps.convert.outputs.dependencies).junit }}
arc--
- name: Download Subversion archives
if: ${{ steps.convert.outputs.subversion &&
fromJson(steps.convert.outputs.subversion).archive }}
env:
SVNARC: ${{ fromJson(steps.convert.outputs.subversion).archive }}
run: |
set -ex
test -d arc || mkdir arc
wget -nv -N -P arc "$SVNARC" "${SVNARC%.tar.bz2}.zip"
- name: Download junit jar file
if: ${{ steps.convert.outputs.targets &&
contains(fromJson(steps.convert.outputs.targets), 'javahl') }}
env:
JUNIT_VER: ${{ fromJson(steps.convert.outputs.dependencies).junit }}
run: |
set -ex
junit_url="https://repo1.maven.org/maven2/junit/junit/$JUNIT_VER/junit-$JUNIT_VER.jar"
test -d arc || mkdir arc
wget -nv -N -P arc "$junit_url"
test-ubuntu:
if: ${{ needs.setup.outputs.ubuntu != '[]' }}
needs: setup
uses: ./.github/workflows/test-ubuntu.yml
with:
targets: ${{ needs.setup.outputs.targets }}
os: ${{ needs.setup.outputs.ubuntu }}
subversion: ${{ needs.setup.outputs.subversion }}
dependencies: ${{ needs.setup.outputs.dependencies }}
test-macos:
if: ${{ needs.setup.outputs.macos != '[]' }}
needs: setup
uses: ./.github/workflows/test-macos.yml
with:
targets: ${{ needs.setup.outputs.targets }}
os: ${{ needs.setup.outputs.macos }}
subversion: ${{ needs.setup.outputs.subversion }}
dependencies: ${{ needs.setup.outputs.dependencies }}
test-windows:
if: ${{ needs.setup.outputs.windows != '[]' }}
needs: setup
uses: ./.github/workflows/test-windows.yml
with:
targets: ${{ needs.setup.outputs.targets }}
os: ${{ needs.setup.outputs.windows }}
subversion: ${{ needs.setup.outputs.subversion }}
dependencies: ${{ needs.setup.outputs.dependencies }}