https://github.com/moeki0/review-browserstack-screenshots
Review system on Github with BrowserStack screenshot
https://github.com/moeki0/review-browserstack-screenshots
browserstack github-actions
Last synced: 5 months ago
JSON representation
Review system on Github with BrowserStack screenshot
- Host: GitHub
- URL: https://github.com/moeki0/review-browserstack-screenshots
- Owner: moeki0
- License: mit
- Created: 2022-11-11T11:12:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T11:13:57.000Z (about 3 years ago)
- Last Synced: 2025-07-31T13:37:10.979Z (5 months ago)
- Topics: browserstack, github-actions
- Language: Ruby
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Review Browserstack Screenshots
## Usage
### Configuration
Configurations should be defined in `.screenshot/config.yaml` .
The following is a sample `.screenshot/config.yaml` .
```yaml
local: false # If true, take screenshots on http://localhost:8000.
table: false # The screenshot table in the comment.
browsers:
-
os: OS X
os_version: Big Sur
browser: safari
browser_version: 14.1
-
os: OS X
os_version: Catalina
browser: safari
browser_version: 13.1
# ...
```
#### Available browsers
To know about all the available combinations, hit the Browser API.
```bash
curl -u ":" https://api.browserstack.com/automate/browsers.json
```
### Workflow
#### Use external server
The following is a sample workflow.
```yaml
name: screenshot
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
screenshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: colorfulcompany/review-browserstack-screenshots@main
with:
pr_number: ${{ github.event.pull_request.number }}
commit_sha: ${{ github.event.pull_request.head.sha }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
browserstack_username: ${{ secrets.BROWSERSTACK_USERNAME }}
browserstack_access_key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
```
#### Use local server
The following is a sample workflow.
```yaml
name: screenshot
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
screenshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
- run: bundle exec jekyll serve --port 8000 & # entrypoint
- uses: colorfulcompany/review-browserstack-screenshots@main
with:
pr_number: ${{ github.event.pull_request.number }}
commit_sha: ${{ github.event.pull_request.head.sha }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
browserstack_username: ${{ secrets.BROWSERSTACK_USERNAME }}
browserstack_access_key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop
```
### Pull reqest keyword
Add a keyword like the following example to the PR description.
```markdown
screenshot https://example.com
```
If you want to take screenshots on local server, like this.
```markdown
screenshot /about
```
### Automatic Comment

## License
The scripts and documentation in this project are released under the MIT License