Skip to content

Commit

Permalink
enable relative-CI (#1265)
Browse files Browse the repository at this point in the history
Co-authored-by: Jerel Miller <[email protected]>
  • Loading branch information
phryneas and jerelmiller authored Mar 12, 2024
1 parent 427578d commit df5300f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/old-bears-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"apollo-client-devtools": patch
---

Use relative-CI to monitor build artefact sizes
28 changes: 28 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"

# Install dependencies
- run: npm ci

# Build and output bunle stats to webpack-stats.json
- run: yarn build --env TARGET=chrome --json webpack-stats.json

# Upload webpack-stats.json to use on relative-ci.yaml workflow
- name: Upload webpack stats artifact
uses: relative-ci/agent-upload-artifact-action@v1
with:
webpackStatsFile: ./webpack-stats.json
17 changes: 17 additions & 0 deletions .github/workflows/relative-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: RelativeCI

on:
workflow_run:
workflows: ["Build"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Send bundle stats and build information to RelativeCI
uses: relative-ci/agent-action@v2
with:
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ build
!./dist/.gitkeep
*.zip
.DS_Store
development/server/db.json
development/server/db.json
webpack-stats.json

0 comments on commit df5300f

Please sign in to comment.