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

improve workflow with fastify-integration job #99

Merged
merged 2 commits into from
Oct 27, 2023
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
45 changes: 44 additions & 1 deletion .github/workflows/plugins-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ on:
required: false
default: false
type: boolean
fastify-dependency-integration:
description: 'Set to true to run fastify tests with the (proposed) changes.'
required: false
default: false
type: boolean

jobs:
dependency-review:
Expand Down Expand Up @@ -120,12 +125,50 @@ jobs:
- name: Run tests
run: npm test

fastify-dependency-integration:
name: Test Fastify Integration
runs-on: ubuntu-latest
if: >
!failure() &&
!cancelled() &&
inputs.fastify-dependency-integration == true
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install dependencies
run: npm i --ignore-scripts

- name: Test Fastify Integration
run: |
npm link &&
PACKAGE_NAME=$(node -p "require('./package.json').name")
git clone https://github.com/fastify/fastify.git --depth 1 &&
cd fastify &&
npm i --ignore-scripts &&
npm link $PACKAGE_NAME &&
npm run unit
Uzlopak marked this conversation as resolved.
Show resolved Hide resolved

automerge:
name: Automerge Dependabot PRs
if: >
always() &&
needs.test.result == 'success' &&
(needs.fastify-dependency-integration.result == 'success' || needs.fastify-dependency-integration.result == 'skipped') &&
github.event_name == 'pull_request' &&
github.event.pull_request.user.login == 'dependabot[bot]'
needs: test
needs:
- test
- fastify-dependency-integration
permissions:
pull-requests: write
contents: write
Expand Down