Skip to content

Stabilise Lighthouse line numbers #424

Stabilise Lighthouse line numbers

Stabilise Lighthouse line numbers #424

Workflow file for this run

name: Audits
on:
push:
branches:
- main
pull_request_target:
branches:
- main
jobs:
javascript:
name: JavaScript
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
workspace:
- apollo-server
- express-graphql
- graph-client
- graphql-helix
- graphql-yoga
- mercurius
env:
PORT: 4000
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install
run: yarn install --immutable
- name: Start
run: yarn workspace ${{ matrix.workspace }} start &
- name: Audit
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace }}
- name: Summary
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
#
# Because of this, we include the root README.md to maintain the paths during artifact downloads
path: |
README.md
implementations/${{ matrix.workspace }}/README.md
implementations/${{ matrix.workspace }}/report.json
docker:
name: Docker
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
workspace:
- deno
- hotchocolate
- lighthouse
- postgraphile
# TODO: speed up build process
# - pioneer
env:
PORT: 4000
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Set up docker buildx
uses: docker/setup-buildx-action@v2
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install
run: yarn install --immutable
- name: Bake
uses: docker/bake-action@v2
with:
workdir: implementations/${{ matrix.workspace }}
load: true # load image into docker, otherwise `docker compose up` will rebuild
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
- name: Start
run: yarn workspace ${{ matrix.workspace }} start --detach --wait
- name: Audit
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace }}
- name: Summary
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
#
# Because of this, we include the root README.md to maintain the paths during artifact downloads
path: |
README.md
implementations/${{ matrix.workspace }}/README.md
implementations/${{ matrix.workspace }}/report.json
url:
name: URL
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
workspace:
- name: thegraph
url: https://api.thegraph.com/subgraphs/name/sushiswap/exchange/graphql
env:
URL: ${{ matrix.workspace.url }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install
run: yarn install --immutable
- name: Audit
run: yarn tsx scripts/audit-implementation.ts implementations/${{ matrix.workspace.name }}
- name: Summary
run: cat implementations/${{ matrix.workspace.name }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
#
# Because of this, we include the root README.md to maintain the paths during artifact downloads
path: |
README.md
implementations/${{ matrix.workspace.name }}/README.md
implementations/${{ matrix.workspace.name }}/report.json
report:
name: Report
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
needs: [javascript, docker, url]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Download audit reports
uses: actions/download-artifact@v3
with:
name: audit-reports
- name: Render servers table
run: node scripts/render-servers-table.mjs
- name: Diff
run: git diff --minimal
- name: Commit
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
[ -z "$(git status --porcelain)" ] \
&& echo "::notice::Nothing new to report." \
|| (git add . && git commit -m "docs(implementations): audit report [skip ci]" && git push)