Skip to content

Commit

Permalink
updating GitHub pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 17, 2024
1 parent 893e78c commit 2e07a97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
20 changes: 20 additions & 0 deletions .github/actions/create-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ runs:
shell: bash
run: node tools/mergeTests.js

- name: Read mochawesome.json
uses: actions/github-script@v7
with:
result-encoding: string
script: |
try {
const fs = require('fs')
const jsonString = fs.readFileSync('test/mochawesome-report/mochawesome.json')
var report = JSON.parse(jsonString);
let stats = {
passing: report.stats.passes,
skipped: report.stats.pending,
failures: report.stats.failures
};
core.notice(JSON.stringify(stats));
} catch(err) {
core.error("Error while reading or parsing test/mochawesome-report/mochawesome.json")
core.setFailed(err)
}
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success()
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-22.04, windows-2022]
os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
# os: [ windows-2022, ubuntu-22.04]
electron: [30.5.0]
# electron: [29.4.6, 30.5.1, 31.6.0]
# electron: [30.5.0]
electron: [29.4.6, 30.5.0, 31.6.0]
# electron: [31.6.0, 32.1.0]

name: test-${{ matrix.os }}-v${{ matrix.electron }}
Expand All @@ -67,22 +67,7 @@ jobs:
files: "build/Release/edge_coreclr.node"
fail: true
ignore_case: true

- name: Read package.json
uses: actions/github-script@v7
with:
result-encoding: string
script: |
try {
const fs = require('fs')
const jsonString = fs.readFileSync('package.json')
var json = JSON.parse(jsonString);
console.log(json.devDependencies)
} catch(err) {
core.error("Error while reading or parsing package.json")
core.setFailed(err)
}

- if: runner.os == 'Windows'
name: Run Windows tests
uses: ./.github/actions/test-windows
Expand Down

0 comments on commit 2e07a97

Please sign in to comment.