jan/.github/workflows/jan-electron-linter-and-test.yml
hiento09 074b18da74
CI automatically update Update README with Nightly Build Information and stable download URL (#940)
* Add table download to README

* CI update Nightly Build URL on github README.md file

* Add CI to update latest release url to README.md

* Add clean cache to test pipeline

* set style=text-align:center in download table

* Manual build update experimental URL if triggered from main branch

---------

Co-authored-by: Hien To <tominhhien97@gmail.com>
2023-12-11 18:33:41 +07:00

120 lines
2.7 KiB
YAML

name: Jan Electron Linter & Test
on:
push:
branches:
- main
paths:
- "electron/**"
- .github/workflows/jan-electron-linter-and-test.yml
- "web/**"
- "uikit/**"
- "package.json"
- "node_modules/**"
- "yarn.lock"
- "core/**"
- "extensions/**"
- "!README.md"
pull_request:
branches:
- main
paths:
- "electron/**"
- .github/workflows/jan-electron-linter-and-test.yml
- "web/**"
- "uikit/**"
- "package.json"
- "node_modules/**"
- "yarn.lock"
jobs:
test-on-macos:
runs-on: [self-hosted, macOS, macos-desktop]
steps:
- name: "Cleanup build folder"
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
rm -rf ~/Library/Application\ Support/jan
- name: Getting the repo
uses: actions/checkout@v3
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: "Cleanup cache"
continue-on-error: true
run: |
make clean
- name: Linter and test
run: |
make test
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
test-on-windows:
runs-on: [self-hosted, Windows, windows-desktop]
steps:
- name: Clean workspace
run: |
Remove-Item -Path .\* -Force -Recurse
$path = "$Env:APPDATA\jan"
if (Test-Path $path) {
Remove-Item $path -Recurse -Force
} else {
Write-Output "Folder does not exist."
}
- name: Getting the repo
uses: actions/checkout@v3
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
# Clean cache, continue on error
- name: "Cleanup cache"
shell: powershell
continue-on-error: true
run: |
make clean
- name: Linter and test
shell: powershell
run: |
make test
test-on-ubuntu:
runs-on: [self-hosted, Linux, ubuntu-desktop]
steps:
- name: "Cleanup build folder"
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
rm -rf ~/.config/jan
- name: Getting the repo
uses: actions/checkout@v3
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: "Cleanup cache"
continue-on-error: true
run: |
make clean
- name: Linter and test
run: |
export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
echo -e "Display ID: $DISPLAY"
make test