-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
156 additions
and
155 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'Test report' | ||
description: 'Create test report' | ||
inputs: | ||
electron: | ||
description: 'Electron version' | ||
required: true | ||
os: | ||
description: 'runs-on' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Merge test files" | ||
shell: bash | ||
run: node tools/mergeTests.js | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: success() | ||
with: | ||
name: ${{ inputs.os }}-${{ inputs.electron }} | ||
path: | | ||
test/mochawesome-report/mochawesome.json | ||
test/mochawesome-report/mochawesome.html | ||
- name: Create test report | ||
uses: phoenix-actions/test-reporting@v15 | ||
if: success() | ||
with: | ||
name: test-results-${{ inputs.os }}-v${{ inputs.electron }} | ||
fail-on-error: true | ||
path: test/mochawesome-report/mochawesome.json # Path to test results | ||
reporter: mochawesome-json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: 'Checkout and setup' | ||
description: 'Checks out code and sets up environment' | ||
name: 'Setup environment' | ||
description: 'Sets up environment' | ||
inputs: | ||
node: | ||
description: 'Node.js version' | ||
required: false | ||
default: '20' | ||
runs-on: | ||
description: 'Runner OS' | ||
os: | ||
description: 'runs-on' | ||
required: false | ||
default: 'windows-2022' | ||
electron: | ||
|
@@ -20,38 +20,16 @@ inputs: | |
runs: | ||
using: "composite" | ||
steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node }} | ||
cache: 'npm' | ||
cache-dependency-path: package-lock.json | ||
|
||
- name: Cache node modules | ||
id: cache-nodemodules | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ inputs.runs-on }}-${{ inputs.electron }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' # SDK Version to use; x will use the latest version of the 8.0 channel | ||
|
||
- name: Versions | ||
shell: bash | ||
run: | | ||
node -v && npm -v && dotnet --version && node -p process.platform && node -p process.arch | ||
|
||
- name: "Read JSON" | ||
- name: Read package.json | ||
uses: actions/github-script@v7 | ||
id: check-env | ||
with: | ||
result-encoding: string | ||
script: | | ||
|
@@ -70,25 +48,28 @@ runs: | |
if: ${{ inputs.replace-version == 'true' }} | ||
run: | | ||
sed -i -e 's/${{ env.json_electron_version}}/=${{ inputs.electron }}/g' package.json | ||
- name: Cache node modules | ||
id: cache-nodemodules | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ inputs.os }}-${{ inputs.electron }}-${{ hashFiles('package.json') }} | ||
|
||
# - if: runner.os == 'Windows' | ||
# uses: agracio/[email protected] | ||
# id: electron_version | ||
# with: | ||
# value: "${{ matrix.electron }}" | ||
# length_from_start: 2 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' # SDK Version to use; x will use the latest version of the 8.0 channel | ||
|
||
# - if: runner.os == 'Windows' | ||
# name: Check electron-edge-js Windows pre-built files | ||
# id: check_windows_build | ||
# uses: andstor/file-existence-action@v3 | ||
# 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: Versions | ||
shell: bash | ||
run: | | ||
node -v && npm -v && dotnet --version && node -p process.platform && node -p process.arch | ||
- name: npm install | ||
shell: bash | ||
run: npm ci | ||
run: npm i | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Test Windows' | ||
description: 'Runs Windows tests' | ||
inputs: | ||
electron: | ||
description: 'Electron version' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: agracio/[email protected] | ||
id: electron_version | ||
with: | ||
value: "${{ inputs.electron }}" | ||
length_from_start: 2 | ||
|
||
- name: Check electron-edge-js Windows pre-built files | ||
uses: andstor/file-existence-action@v3 | ||
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: Run .NET 4.5 tests Windows | ||
shell: bash | ||
run: node tools/test.js CI | ||
|
||
- if: runner.os == 'Windows' | ||
shell: bash | ||
name: "Run .net core tests Windows" | ||
run: node tools/test.js CI | ||
env: | ||
EDGE_USE_CORECLR: 1 |
This file contains 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
Oops, something went wrong.