Feature/gecko-lift-coupling: limit homogenisation to WBM and fix constraint renaming #256
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cobratoolboxCI (merge, test, and upload) | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| - master | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check out merged PR code | |
| uses: actions/checkout@v4 | |
| - name: Install xvfb (skip if already installed) | |
| run: | | |
| if ! command -v xvfb-run >/dev/null 2>&1; then | |
| apt-get update -y | |
| apt-get install -y xvfb | |
| else | |
| echo "xvfb already installed." | |
| fi | |
| - name: Run MATLAB Tests (xvfb headless) | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| JAVA_AWT_HEADLESS: "1" | |
| run: | | |
| xvfb-run -a -s "-screen 0 1280x1024x24" \ | |
| matlab -noFigureWindows -batch "try; run('initCobraToolbox.m'); set(0,'DefaultFigureVisible','off'); run('test/testAll.m'); catch ME; disp(getReport(ME,'extended')); exit(1); end; exit(0);" | |
| # New: ensure Node.js is present | |
| - name: Set up Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Convert JUnit to CTRF | |
| run: | | |
| # Check Node.js version (optional guard) | |
| MAJOR="$(node -p "process.versions.node.split('.')[0]")" | |
| if [ "$MAJOR" -lt 20 ]; then | |
| echo "❌ Node.js version too old: $(node -v). Please install Node 20 or newer." | |
| exit 1 | |
| fi | |
| # Print versions for debugging clarity | |
| echo "✅ Node version: $(node -v)" | |
| echo "✅ npm version: $(npm -v)" | |
| # Ensure output directory exists | |
| mkdir -p ./ctrf | |
| # Run conversion | |
| echo "Converting JUnit XML to CTRF JSON..." | |
| npx --yes junit-to-ctrf@0.0.12 ./testReport.junit.xml -o ./ctrf/ctrf-report.json | |
| - name: Upload CTRF Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: testReport | |
| path: ./ctrf/ctrf-report.json | |
| - name: Save PR Number | |
| run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
| - name: Upload PR Number as Artifact | |
| run: echo $PR_NUMBER > pr_number.txt | |
| shell: bash | |
| - name: Upload PR Number Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr_number | |
| path: pr_number.txt |