Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable trigger for pull_request_target ci linter #2609

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Enable trigger for pull_request_target ci linter
  • Loading branch information
hientominh committed Apr 4, 2024
commit 428ab69f1afd38cdc2378e9ebb55a793c3bc9dd4
79 changes: 79 additions & 0 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ on:

jobs:
test-on-macos:
if : github.event_name != 'pull_request_target'
runs-on: [self-hosted, macOS, macos-desktop]
steps:
- name: Getting the repo
Expand All @@ -64,6 +65,31 @@ jobs:
TURBO_TEAM: "macos"
TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}"

test-on-macos-pr-target:
if : github.event_name == 'pull_request_target'
runs-on: [self-hosted, macOS, macos-desktop]
steps:
- name: Getting the repo
uses: actions/checkout@v3

- name: Installing node
uses: actions/setup-node@v3
with:
node-version: 20

- name: "Cleanup cache"
continue-on-error: true
run: |
make clean

- name: Linter and test
run: |
npm config set registry https://registry.npmjs.org --global
yarn config set registry https://registry.npmjs.org --global
make test
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"

test-on-windows:
if: github.event_name == 'push'
strategy:
Expand Down Expand Up @@ -127,8 +153,36 @@ jobs:
TURBO_TEAM: "windows"
TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}"

test-on-windows-pr-target:
if: github.event_name == 'pull_request_target'
runs-on: windows-desktop-default-windows-security
steps:
- 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: |
npm config set registry https://registry.npmjs.org --global
yarn config set registry https://registry.npmjs.org --global
make test


test-on-ubuntu:
runs-on: [self-hosted, Linux, ubuntu-desktop]
if: github.event_name != 'pull_request_target'
steps:
- name: Getting the repo
uses: actions/checkout@v3
Expand All @@ -154,3 +208,28 @@ jobs:
TURBO_API: "${{ secrets.TURBO_API }}"
TURBO_TEAM: "linux"
TURBO_TOKEN: "${{ secrets.TURBO_TOKEN }}"

test-on-ubuntu-pr-target:
runs-on: [self-hosted, Linux, ubuntu-desktop]
if: github.event_name == 'pull_request_target'
steps:
- name: Getting the repo
uses: actions/checkout@v3

- name: Installing node
uses: actions/setup-node@v3
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"
npm config set registry https://registry.npmjs.org --global
yarn config set registry https://registry.npmjs.org --global
make test
Loading