123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- name: javascript
- on:
- push:
- branches:
- - master
- pull_request:
- paths:
- - '**.[tj]sx?'
- - package.json
- - yarn.lock
- jobs:
- getsentry:
- if: ${{ github.ref != 'refs/heads/master' }}
- runs-on: ubuntu-16.04
- steps:
- - name: getsentry token
- id: getsentry
- uses: getsentry/action-github-app-token@v1
- with:
- app_id: ${{ secrets.SENTRY_INTERNAL_APP_ID }}
- private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }}
- # Notify getsentry
- - name: Dispatch getsentry tests
- uses: actions/github-script@v3
- with:
- github-token: ${{ steps.getsentry.outputs.token }}
- script: |
- github.actions.createWorkflowDispatch({
- owner: 'getsentry',
- repo: 'getsentry',
- workflow_id: 'javascript.yml',
- ref: 'master',
- inputs: {
- 'sentry-sha': '${{ github.event.pull_request.head.sha }}',
- }
- })
- build:
- name: lint and typescript
- if: ${{ github.ref != 'refs/heads/master' }}
- runs-on: ubuntu-16.04
- steps:
- # Checkout codebase
- - uses: actions/checkout@v2
- # Install/setup node
- - uses: volta-cli/action@v1
- # See https://github.com/actions/cache/blob/master/examples.md#node---yarn for example
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: echo "::set-output name=dir::$(yarn cache dir)"
- # yarn cache
- - uses: actions/cache@v1
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- ${{ runner.os }}-yarn-
- - name: Install dependencies
- run: yarn install --frozen-lockfile
- - name: eslint + fix
- uses: getsentry/action-eslint-fix@master
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # Setup custom tsc matcher, see https://github.com/actions/setup-node/issues/97
- - name: tsc
- id: tsc
- if: always()
- run: |
- echo "::remove-matcher owner=tsc::"
- echo "::add-matcher::.github/tsc.json"
- yarn tsc -p config/tsconfig.build.json
- webpack:
- runs-on: ubuntu-16.04
- steps:
- # Checkout codebase
- - uses: actions/checkout@v2
- # Install/setup node
- - uses: volta-cli/action@v1
- # See https://github.com/actions/cache/blob/master/examples.md#node---yarn for example
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: echo "::set-output name=dir::$(yarn cache dir)"
- # yarn cache
- - uses: actions/cache@v1
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- ${{ runner.os }}-yarn-
- - name: Install dependencies
- run: yarn install --frozen-lockfile
- - uses: getsentry/size-limit-action@v1-dev
- with:
- main_branch: master
- skip_step: install
- build_script: build
- windows_verbatim_arguments: false
- github_token: ${{ secrets.GITHUB_TOKEN }}
|