Bump API schema to 8f9e958f (#8696) #21942
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/[email protected] | |
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 | |
- uses: actions/cache@v3 | |
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@v3 | |
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/[email protected] | |
- 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@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 | |
- uses: actions/cache@v3 | |
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@748c31dd78cffe76f51bef49a0be856b6effeda7 # main | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
job_test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 | |
- uses: actions/cache@v3 | |
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/[email protected] | |
- uses: getsentry/action-setup-volta@c52be2ea13cfdc084edb806e81958c13e445941e # v1.2.0 | |
- uses: actions/cache@v3 | |
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 |