Skip to content

Commit

Permalink
testing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 13, 2024
1 parent 7a435d8 commit 1173814
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ jobs:
path: node_modules
key: ${{ matrix.os }}-${{ matrix.electron }}-${{ hashFiles('package-lock.json') }}

- if: runner.os == 'Linux'
name: Setup xvfb
# Xvfb :99 &
run: |
# sudo apt-get install -y xvfb
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
# - if: runner.os == 'Linux'
# name: Setup xvfb
# # Xvfb :99 &
# run: |
# # sudo apt-get install -y xvfb
# export DISPLAY=:99
# sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &

- name: Setup dotnet
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -103,8 +103,8 @@ jobs:
- if: runner.os == 'Linux'
name: "Run .net core tests"
run: |
export DISPLAY=:99.0
echo "DISPLAY=:99.0" >> $GITHUB_ENV
export DISPLAY=:99
echo "DISPLAY=:99" >> $GITHUB_ENV
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
node tools/test.js CI
Expand Down
12 changes: 12 additions & 0 deletions test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ exports.runTests = function (framework, window){
}
}, 1000);
});
run.on('fail', function(){
setTimeout(function(){
mocha.dispose();
console.log('run failed')
window.webContents.send("runComplete", reportFilename);
console.log('run fail')
if(runner === 'CI'){
console.log('window.close()')
window.close();
}
}, 1000);
});

};

Expand Down

0 comments on commit 1173814

Please sign in to comment.