Skip to content

Commit

Permalink
CI: Speed up builds (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw committed Nov 22, 2022
1 parent 03f7684 commit 9b75054
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 25 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install dependencies
run: yarn
run: yarn install --immutable --prefer-offline
- name: Check types
run: yarn typecheck
- name: Lint
Expand All @@ -26,11 +28,11 @@ jobs:
run: yarn test:ci

- name: '@grafana/create-plugin - test an app plugin generation'
run: yarn workspace @grafana/create-plugin run generate-app && (cd ./packages/create-plugin/generated && yarn && yarn build && yarn lint)
run: yarn workspace @grafana/create-plugin run generate-app && (cd ./packages/create-plugin/generated && yarn install --prefer-offline && yarn build && yarn lint)
- name: '@grafana/create-plugin - test panel plugin generation'
run: yarn workspace @grafana/create-plugin run generate-panel && (cd ./packages/create-plugin/generated && yarn && yarn build && yarn lint)
run: yarn workspace @grafana/create-plugin run generate-panel && (cd ./packages/create-plugin/generated && yarn install --prefer-offline && yarn build && yarn lint)
- name: '@grafana/create-plugin - test datasource plugin generation'
run: yarn workspace @grafana/create-plugin run generate-datasource && (cd ./packages/create-plugin/generated && yarn && yarn build && yarn lint)
run: yarn workspace @grafana/create-plugin run generate-datasource && (cd ./packages/create-plugin/generated && yarn install --prefer-offline && yarn build && yarn lint)

- name: '@grafana/sign-plugin - build'
run: yarn workspace @grafana/sign-plugin run build
Expand Down Expand Up @@ -58,17 +60,10 @@ jobs:
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
run: yarn install --immutable --prefer-offline

- name: Build
run: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
node_modules

# Build output
generated
packages/create-plugin/generated
dist

# Errors
Expand Down
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
# Grafana / Plugins tools

Create and Sign Grafana plugins with ease.

This is a mono-repo of packages aimed at helping plugin developers extend Grafana in amazing ways!

| Package Name | Description | Readme |
| ------------- | ------------------------- | ------------------------------------------ |
| Create Plugin | Scaffold a Grafana Plugin | [Link](./packages/create-plugin/README.md) |
| Sign Plugin | Sign a Grafana Plugin | [Link](./packages/sign-plugin/README.md) |
<div align="center">
<img
src="./docs/img/grafana_icon.svg"
alt="Grafana Logo"
width="100px"
padding="40px"
/>
<h1>Grafana Plugin tools</h1>
<p>Create and Sign Grafana plugins with ease.</p>
</div>
<div align="center">
<a href="https://github.com/grafana/plugin-tools/actions/workflows/ci.yml"
><img
src="https://github.com/grafana/plugin-tools/actions/workflows/ci.yml/badge.svg"
alt="Node CI" /></a
>&nbsp;
<a href="https://github.com/intuit/auto"
><img
src="https://img.shields.io/badge/release-auto.svg?colorA=888888&amp;colorB=9B065A&amp;label=auto"
alt="Auto Release"
/></a>
<br />
<br />
</div>

This is a mono-repo of NPM packages to help plugin developers extend Grafana in amazing ways!

| Package Name | Description | Readme | Version | Downloads |
| ------------- | ------------------------- | ------------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Create Plugin | Scaffold a Grafana Plugin | [Link](./packages/create-plugin/README.md) | ![npm](https://img.shields.io/npm/v/@grafana/create-plugin?label=version) | ![npm](https://img.shields.io/npm/dw/@grafana/create-plugin) |
| Sign Plugin | Sign a Grafana Plugin | [Link](./packages/sign-plugin/README.md) | ![npm](https://img.shields.io/npm/v/@grafana/sign-plugin?label=version) | ![npm](https://img.shields.io/npm/dw/@grafana/sign-plugin) |

## Contributors ✨

Expand All @@ -29,4 +50,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
57 changes: 57 additions & 0 deletions docs/img/grafana_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b75054

Please sign in to comment.