github.com/grafana/pyroscope@v1.18.0/.github/workflows/frontend.yml (about) 1 name: frontend 2 on: 3 push: 4 branches: 5 - main 6 pull_request: 7 concurrency: 8 # Cancel any running workflow for the same branch when new commits are pushed. 9 # We group both by ref_name (available when CI is triggered by a push to a branch/tag) 10 # and head_ref (available when CI is triggered by a PR). 11 group: "frontend-${{ github.ref_name }}-${{ github.head_ref }}" 12 cancel-in-progress: true 13 permissions: 14 contents: read 15 jobs: 16 type-check: 17 runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64' || 'ubuntu-latest' }} 18 steps: 19 - name: Checkout code 20 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 21 with: 22 persist-credentials: 'false' 23 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 24 with: 25 node-version: 20 26 cache: yarn 27 - run: yarn --frozen-lockfile 28 - name: Run type-check 29 run: yarn type-check 30 format: 31 runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64' || 'ubuntu-latest' }} 32 steps: 33 - name: Checkout code 34 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 35 with: 36 persist-credentials: 'false' 37 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 38 with: 39 node-version: 20 40 cache: yarn 41 - run: yarn --frozen-lockfile 42 - name: Run format 43 run: yarn run format 44 lint: 45 runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64' || 'ubuntu-latest' }} 46 steps: 47 - name: Checkout code 48 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 49 with: 50 persist-credentials: 'false' 51 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 52 with: 53 node-version: 20 54 cache: yarn 55 - run: yarn --frozen-lockfile 56 - name: Run lint 57 run: yarn lint 58 build: 59 runs-on: ${{ github.repository_owner == 'grafana' && 'ubuntu-x64' || 'ubuntu-latest' }} 60 steps: 61 - name: Checkout code 62 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 63 with: 64 persist-credentials: 'false' 65 - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 66 with: 67 node-version: 20 68 cache: yarn 69 - run: yarn --frozen-lockfile 70 - name: Run build 71 run: yarn build