From da555cb4db8cb7b3cb3d34008f1fd0502bf665fc Mon Sep 17 00:00:00 2001
From: PauliusKu
Date: Thu, 23 Jan 2025 18:04:14 +0200
Subject: [PATCH] pipeline fix
---
.github/workflows/main.yml | 80 +++++++++++++++++++++++---------------
1 file changed, 49 insertions(+), 31 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 474ebf7..186188e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,36 +4,54 @@
name: Node.js CI
on:
- push:
- branches: [ "develop" ]
- pull_request:
- branches: [ "develop" ]
+ push:
+ branches: ["develop"]
+ pull_request:
+ branches: ["develop"]
jobs:
- build:
- strategy:
- matrix:
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Install Node.js
- uses: actions/setup-node@v4
- with:
- node-version: 18.x
- - run: npm install
- - run: xvfb-run -a npm test
- if: runner.os == 'Linux'
- - run: npm test
- if: runner.os != 'Linux'
-
- - run: xvfb-run -a npm run get-ade-test
- if: runner.os == 'Linux'
- - run: npm run get-ade-test
- if: runner.os != 'Linux'
-
- - run: xvfb-run -a npm run stability-test
- if: runner.os == 'Linux'
- - run: npm run stability-test
- if: runner.os != 'Linux'
+ test:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 18.x
+
+ - run: npm install
+
+ - name: Run Tests
+ run: xvfb-run -a npm test
+ if: runner.os == 'Linux'
+
+ - name: Run Tests (Non-Linux)
+ run: npm test
+ if: runner.os != 'Linux'
+
+ stability-test:
+ needs: test # Runs only if 'test' job is successful
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 18.x
+
+ - run: npm install
+
+ - name: Get ADE Repo
+ run: xvfb-run -a npm run get-ade-test
+ if: runner.os == 'Linux'
+
+ - name: Run Stability Test
+ run: xvfb-run -a npm run stability-test
+ if: runner.os == 'Linux'