Enable trigger for pull_request_target ci linter (#2609)

Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
hiento09 2024-04-04 10:08:11 +07:00 committed by GitHub
parent 52654b1055
commit c4da1cbc90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
@ -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:
@ -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
@ -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