@@ -3,17 +3,28 @@ name: 'BrowserStack Test'
33on :
44 pull_request_target :
55 branches : [ master ]
6-
7- jobs :
6+ types : [ labeled ]
7+
8+ jobs :
89 ubuntu-job :
910 name : ' BrowserStack Test on Ubuntu'
10- runs-on : ubuntu-latest # Can be self-hosted runner also
11- environment :
12- name : Integrate Pull Request
13- env :
11+ runs-on : ubuntu-latest
12+ if : github.event.label.name == 'safe_to_test'
13+ env :
1414 GITACTIONS : true
1515 steps :
1616
17+ - name : ' Remove safe_to_test label'
18+ uses : actions/github-script@v8
19+ with :
20+ script : |
21+ await github.rest.issues.removeLabel({
22+ owner: context.repo.owner,
23+ repo: context.repo.repo,
24+ issue_number: context.payload.pull_request.number,
25+ name: 'safe_to_test'
26+ });
27+
1728 - name : ' BrowserStack Env Setup' # Invokes the setup-env action
1829 uses : browserstack/github-actions/setup-env@master
1930 with :
2738 local-identifier : random
2839
2940 - name : ' Checkout the repository'
30- uses : actions/checkout@v4
41+ uses : actions/checkout@v6
3142 with :
3243 ref : ${{ github.event.pull_request.head.sha }}
3344 fetch-depth : 2
@@ -40,11 +51,13 @@ jobs:
4051 run : |
4152 sudo apt update
4253 sudo apt install libcurl4 libcurl4-openssl-dev
54+
4355 - name : ' Configure Bundle testing and install gems'
4456 run : |
4557 bundle config unset --local without
4658 bundle config set --local with 'test' 'development'
4759 bundle install
60+
4861 - name : ' Run BrowserStack simple verification'
4962 run : |
5063 bundle exec rake browserstack --trace
0 commit comments