feat(js): Add documentation for new ContextLines
integration
#18406
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Lint, and Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
job_build: | |
name: Build | |
runs-on: ubuntu-latest | |
env: | |
JEKYLL_ENABLE_PLATFORM_API: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0 | |
- uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: node-${{ runner.os }}-${{ hashfiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
if: steps.cache.outputs.cache-hit != 'true' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
.cache | |
public | |
key: node-${{ runner.os }}-${{ hashfiles('**/yarn.lock') }}-gatsby-build | |
- name: yarn build | |
run: yarn build | |
- run: yarn lint:links | |
job_lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Internal github app token | |
id: token | |
uses: getsentry/action-github-app-token@97c9e23528286821f97fba885c1b1123284b29cc # v2.0.0 | |
continue-on-error: true | |
with: | |
app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }} | |
private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} | |
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0 | |
- uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
if: steps.cache.outputs.cache-hit != 'true' | |
# Additional checks | |
- run: yarn lint:ts | |
- run: yarn lint:docs | |
# Run automatic fixes (run prettier apart from eslint to also fix mdx files) | |
- run: yarn lint:prettier:fix | |
- run: yarn lint:eslint:fix | |
# Check (and error) for dirty working tree for forks | |
# Reason being we need a different token to auto commit changes and | |
# forks do not have access to said token | |
- name: Check for dirty git working tree (forks) | |
if: steps.token.outcome != 'success' && github.ref != 'refs/heads/master' | |
run: | | |
git diff --quiet || (echo '::error ::lint produced file changes, run linter locally and try again' && exit 1) | |
# If working tree is dirty, commit and update if we have a token | |
- name: Commit any eslint fixed files | |
if: steps.token.outcome == 'success' && github.ref != 'refs/heads/master' | |
uses: getsentry/action-github-commit@bec0adb2924f8c19a9f84c18c83d375caf02ca38 # main | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
job_test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0 | |
- uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Run Tests | |
run: yarn test | |
job_test_build: | |
name: Build (env=test) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0 | |
- uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- run: yarn install --frozen-lockfile | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Build | |
run: yarn build:test |