Skip to content

Commit

Permalink
adding GitHub CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 15, 2024
1 parent 35b3e64 commit 1daa62f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
electron: [29.4.6, 30.5.1, 31.6.0]
# electron: [31.6.0, 32.1.0]

name: test-${{ matrix.os }}-${{ matrix.electron }}
name: test-${{ matrix.os }}-v${{ matrix.electron }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -80,7 +80,8 @@ jobs:
run: |
sed -i -e 's/"electron": "=31.6.0"/"electron": "=${{ matrix.electron }}"/g' package.json
- uses: bhowell2/[email protected]
- if: runner.os == 'Windows'
uses: bhowell2/[email protected]
id: electron_version
with:
value: "${{ matrix.electron }}"
Expand All @@ -93,6 +94,7 @@ jobs:
with:
files: "lib/native/win32/${{ runner.arch }}/${{ steps.electron_version.outputs.substring }}.0.0/edge_coreclr.node, lib/native/win32/${{ runner.arch }}/${{ steps.electron_version.outputs.substring }}.0.0/edge_nativeclr.node"
fail: true
ignore_case: true

- name: npm install
run: npm i --no-audit
Expand All @@ -106,6 +108,7 @@ jobs:
with:
files: "build/Release/edge_coreclr.node"
fail: true
ignore_case: true

# - if: (runner.os == 'macOS' || runner.os == 'Linux') && steps.check_build.outputs.files_exists == 'false'
# name: electron-edge-js build failed
Expand All @@ -114,23 +117,23 @@ jobs:
# exit 1
# continue-on-error: true

- if: runner.os == 'Windows' && steps.check_windows_build.outputs.files_exists == 'true'
- if: runner.os == 'Windows'
name: Run .NET 4.5 tests Windows
run: node tools/test.js CI

- if: runner.os == 'Windows' && steps.check_windows_build.outputs.files_exists == 'true'
- if: runner.os == 'Windows'
name: "Run .net core tests Windows"
run: node tools/test.js CI
env:
EDGE_USE_CORECLR: 1

- if: runner.os == 'macOS' && steps.check_build.outputs.files_exists == 'true'
- if: runner.os == 'macOS'
name: "Run .net core tests macOS"
run: node tools/test.js CI
env:
EDGE_USE_CORECLR: 1

- if: runner.os == 'Linux' && steps.check_build.outputs.files_exists == 'true'
- if: runner.os == 'Linux'
name: "Run .net core tests Linux"
run: |
export DISPLAY=:99
Expand All @@ -141,13 +144,12 @@ jobs:
env:
EDGE_USE_CORECLR: 1

- if: steps.check_build.outputs.files_exists == 'true' || runner.os == 'Windows'
name: "Merge test files"
- name: "Merge test files"
run: node tools/mergeTests.js

- name: Upload artifacts
uses: actions/[email protected]
if: success() && (steps.check_build.outputs.files_exists == 'true' || steps.check_windows_build.outputs.files_exists == 'true')
if: success()
with:
name: ${{ matrix.os }}-${{ matrix.electron }}
path: |
Expand All @@ -156,9 +158,9 @@ jobs:
- name: Create test report
uses: phoenix-actions/test-reporting@v15
if: success() && (steps.check_build.outputs.files_exists == 'true' || steps.check_windows_build.outputs.files_exists == 'true')
if: success()
with:
name: test-results-${{ matrix.os }}-${{ matrix.electron }}
name: test-results-${{ matrix.os }}-v${{ matrix.electron }}
fail-on-error: true
path: test/mochawesome-report/mochawesome.json # Path to test results
reporter: mochawesome-json
Expand Down

0 comments on commit 1daa62f

Please sign in to comment.