Skip to content

Add version verification to tests #97

Add version verification to tests

Add version verification to tests #97

---
name: Functional Tests
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request:
defaults:
run:
shell: sh
jobs:
setup-jolie:
name: Setup jolie
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "windows"]
version: ["1.12.0", "1.11.2", "1.11.1"]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Setup Jolie
uses: ./
with:
version: ${{ matrix.version }}
- name: Verify installed version
run: |
output="$(jolie --version 2>&1)"
actual_version=$(echo "$output" | cut -d ' ' -f 2)
expected_version="${{ matrix.version }}"
if [ "${expected_version}" != "${actual_version}" ]; then
msg="Expected - ${expected_version}. Received - ${actual_version}."
echo "::error title=Unexpected jolie version::${msg}"
exit 1
fi
setup-jolie-alpine:
name: Setup jolie
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
image: ["alpine"]
version: ["1.11.2", "1.11.1", "1.11.0"]
runs-on: ubuntu-latest
container:
image: adoptopenjdk/openjdk11:${{ matrix.image }}-nightly-slim
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Install tools
run: |
apk update
apk add --update bash maven
- name: Setup Jolie
uses: ./
with:
version: ${{ matrix.version }}
- name: Verify installed version
run: |
actual_version=$(jolie --version 2>&1 | cut -d ' ' -f 2)
expected_version="${{ matrix.version }}"
if [ "${expected_version}" != "${actual_version}" ]; then
msg="Expected - ${expected_version}. Received - ${actual_version}."
echo "::error title=Unexpected jolie version::${msg}"
exit 1
fi