Skip to content

Enable node test

Enable node test #273

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
mac:
runs-on: macos-latest
timeout-minutes: 60
env:
USE_HARD_LINKS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Prepare
run: npm run test:prepare:ci
- name: Node Test
run: npm run test:node
- name: Unit Test
run: npm run test:unit
# - name: Integration Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:integration
# - name: MainView Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:mainview
# - name: Extension Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:extension
- name: Publish Mac
if: ${{ fromJSON(env.PUSH_PACKAGES) }}
run: npm run publish-mac
linux:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
USE_HARD_LINKS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Prepare
run: npm run test:prepare:ci
- name: Node Test
run: npm run test:node
- name: Unit Test
run: DISPLAY=:99.0 npm run test:unit
# - name: Integration Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:integration
# - name: MainView Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:mainview
# - name: Extension Test
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test:extension
- name: Publish Linux
if: ${{ fromJSON(env.PUSH_PACKAGES) }}
run: npm run publish-linux
windows:
runs-on: windows-latest
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
TEST_JUNIT_XML_ROOT: c:\projects\junit-test-results
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Prepare
run: npm run test:prepare:ci
- name: Node Test
run: npm run test:node
- name: Unit Test
run: npm run test:unit
- name: Integration Test
run: npm run test:integration
- name: MainView Test
run: npm run test:mainview
- name: Extension Test
run: npm run test:extension
- name: Publish Windows
if: ${{ fromJSON(env.PUSH_PACKAGES) }}
run: npm run publish-win
- name: Pack Windows
if: ${{ !fromJSON(env.PUSH_PACKAGES) }}
run: npm run pack
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: ${{ env.TEST_JUNIT_XML_ROOT }}\**\*.xml