Skip to content

Matrix compat

Matrix compat #1218

Workflow file for this run

name: Matrix compat
on:
schedule:
# every night at one
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
create-version-matrix:
runs-on: ubuntu-latest
steps:
- id: mintaka-version
uses: wistefan/[email protected]
with:
include: "MINOR"
repository: fiware/mintaka
token: ${{ secrets.ADMIN_TOKEN }}
- id: orion-version
uses: wistefan/get-releases-by-semver@master
with:
include: "MINOR"
minMinor: "6"
versionField: "TAG-NAME"
repository: fiware/context.Orion-LD
outputs:
mintaka-matrix: ${{ steps.mintaka-version.outputs.releases }}
orion-matrix: ${{ steps.orion-version.outputs.releases }}
test-compatibility:
needs: create-version-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
orion: ${{fromJson(needs.create-version-matrix.outputs.orion-matrix)}}
mintaka: ${{fromJson(needs.create-version-matrix.outputs.mintaka-matrix)}}
steps:
- uses: actions/checkout@v2
- uses: wistefan/check-compatibility@master
id: check-compatibility
continue-on-error: true
with:
componentOne: "orion"
componentTwo: "mintaka"
versionOne: ${{ matrix.orion }}
versionTwo: ${{ matrix.mintaka }}
compatibilityFile: doc/compatibility/compatibility.json
- uses: actions/setup-java@v1
with:
java-version: '17'
java-package: jdk
- uses: actions/checkout@v2
with:
ref: ${{ matrix.mintaka }}
- name: Run tests
id: runTest
if: steps.check-compatibility.outcome == 'failure'
continue-on-error: true
run: mvn clean test
env:
ORION_IMAGE: fiware/orion-ld:${{ matrix.orion }}
- name: Publish success
if: steps.runTest.outcome == 'success'
uses: wistefan/check-compatibility@master
with:
operation: "PERSIST_INFO"
componentOne: "orion"
componentTwo: "mintaka"
versionOne: ${{ matrix.orion }}
versionTwo: ${{ matrix.mintaka }}
compatibilityFile: compatibility.json
compatible: "True"
- name: Publish failure
if: steps.runTest.outcome == 'failure'
uses: wistefan/check-compatibility@master
with:
operation: "PERSIST_INFO"
componentOne: "orion"
componentTwo: "mintaka"
versionOne: ${{ matrix.orion }}
versionTwo: ${{ matrix.mintaka }}
compatibilityFile: compatibility.json
compatible: "False"
- name: Upload report
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.orion }}-${{ matrix.mintaka }}
path: compatibility.json
result-step:
needs: test-compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: compat-matrix
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- uses: actions/download-artifact@v2
with:
path: results
token: ${{ secrets.ADMIN_TOKEN }}
- id: prepare-results
run: |
jq -s '[.[][0]]' ./results/**/compatibility.json > temp-compat.json
- id: merge
run: |
jq -s '[.[][]]|unique' temp-compat.json doc/compatibility/compatibility.json > merged-compat.json
cp merged-compat.json doc/compatibility/compatibility.json
- uses: wistefan/check-compatibility@master
id: create-markdown
with:
operation: "MARKDOWN"
componentOne: "orion"
componentTwo: "mintaka"
compatibilityFile: doc/compatibility/compatibility.json
markdownOutput: doc/compatibility/compatibility.md
- name: Git commit
# dont fail if nothing is to be commited
continue-on-error: true
run: |
git add .
git commit -m "Update compat-matrix"
git push