Skip to content

Commit

Permalink
tests: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Jul 22, 2024
1 parent 7c997c0 commit b6e24e3
Show file tree
Hide file tree
Showing 9 changed files with 5,259 additions and 3,906 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/npm-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# ---------------------------------------------------------------------------------------
# @parent : github workflow
# @desc : build release
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# ---------------------------------------------------------------------------------------

name: "📦 NPM › Build"
run-name: "📦 NPM › Build"

# ---------------------------------------------------------------------------------------
# triggers
# ---------------------------------------------------------------------------------------

on:
workflow_dispatch:

# ---------------------------------------------------------------------------------------
# jobs
# ---------------------------------------------------------------------------------------

jobs:
build:
name: >-
📦 Tests › Initialize
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 17.x, 18.x, 20.x, 22.x]

steps:
- name: "✅ Start"
id: task_initialize_start
run: |
echo "Starting build"
# ---------------------------------------------------------------------------------------
# Job > Initialize > Checkout
# ---------------------------------------------------------------------------------------

- name: "☑️ Checkout"
id: task_initialize_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# ---------------------------------------------------------------------------------------
# Job > Use NodeJS
# ---------------------------------------------------------------------------------------

- name: "⚙️ Setup Node"
id: task_initialize_node_setup
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# ---------------------------------------------------------------------------------------
# Job > Npm > Install Dependencies
# ---------------------------------------------------------------------------------------

- name: "⚙️ Install Dependencies"
id: task_initialize_npm_deps
run: |
npm ci
npx playwright install --with-deps
npx electron-playwright-helpers install --with-deps
# ---------------------------------------------------------------------------------------
# Job > Npm > Run Tests
# ---------------------------------------------------------------------------------------

- name: "⚙️ Run Tests"
run: npx playwright test

# ---------------------------------------------------------------------------------------
# Job > Npm > Generate Report
# ---------------------------------------------------------------------------------------

- name: "⚙️ Generate Report"
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30



5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@
!*styles.css
!*.sh
!*.bat
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set "FileDescription=ntfy desktop client with Electron wrapper"
set "ProductName=ntfy desktop"
set "OriginalFilename=ntfy-desktop.exe"
set "CompanyName=https://github.com/xdpirate/ntfy-electron"
set "IgnorePattern=(!dir_dist!*|!dir_build!*|.github*|.all-contributorsrc|.editorconfig|.eslintrc|.git*|.npm*|.prettier*)"
set "IgnorePattern=(!dir_dist!*|!dir_build!*|.github*|test-*|tests*|playwright*|.all-contributorsrc|.editorconfig|.eslintrc|.git*|.npm*|.prettier*)"

:: -----------------------------------------------------------------------------------------------------
:: Create build directory
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FileDescription='ntfy desktop client with Electron wrapper'
ProductName='ntfy desktop'
OriginalFilename='ntfy-desktop.exe'
CompanyName='https://github.com/xdpirate/ntfy-electron'
IgnorePattern='(${dir_dist}*|${dir_build}*|.github*|.all-contributorsrc|.editorconfig|.eslintrc|.git*|.npm*|.prettier*)'
IgnorePattern='(${dir_dist}*|${dir_build}*|.github*|test-*|tests*|playwright*|.all-contributorsrc|.editorconfig|.eslintrc|.git*|.npm*|.prettier*)'

# #
# define: platforms
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ const menu_Main = [
submenu: [
{
label: 'Quit',
id: 'quit',
accelerator: (bHotkeysEnabled == 1 || store.get('bHotkeys') == 1) ? 'CTRL+Q' : '',
click: function () {
app.isQuiting = true;
Expand All @@ -304,6 +305,7 @@ const menu_Main = [
submenu: [
{
label: 'General',
id: 'general',
accelerator: (bHotkeysEnabled == 1 || store.get('bHotkeys') == 1) ? 'CTRL+G' : '',
click: function () {
prompt(
Expand Down
Loading

0 comments on commit b6e24e3

Please sign in to comment.