Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test generated plugins on the pipeline #28

Merged
merged 3 commits into from
Aug 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup .npmrc file for NPM registry
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed this bit in the previous PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why we need to do this here for test, lint etc. Later when publishing it looks like we do this here. 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not really necessary for the ubuntu-latest image in github but then we are running the nodejs version that github provides on their runners. This guarantees we run the nodejs version we specify. Also when I was testing with act (local github workflows runner) if I didn't use this it would not run.

uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn
- name: Check types
Expand All @@ -18,6 +23,12 @@ jobs:
run: yarn lint
- name: Unit tests
run: yarn jest
- name: test an app plugin generation
run: yarn generate-app && (cd generated && yarn && yarn build && yarn lint)
- name: test panel plugin generation
run: yarn generate-panel && (cd generated && yarn && yarn build && yarn lint)
- name: test datasource plugin generation
run: yarn generate-datasource && (cd generated && yarn && yarn build && yarn lint)
publish:
name: Publish to NPM Package Registry
runs-on: ubuntu-latest
Expand All @@ -44,7 +55,7 @@ jobs:
if: steps.version_check.outputs.changed == 'true'
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down