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

ci(package-manager-ci): replace jobs with reusable workflow #65

Merged
merged 1 commit into from
May 2, 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
72 changes: 13 additions & 59 deletions .github/workflows/package-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,18 @@ name: package-manager-ci
on:
push:
branches:
- master

permissions:
contents: read
- main
- master
- next
- 'v*'
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'

jobs:
pnpm:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# Maintenance and active LTS
node-version: [14, 16, 18]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install with pnpm
run: |
curl -L https://unpkg.com/@pnpm/self-installer | node
pnpm install

- name: Run tests
run: |
pnpm run test

yarn:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# Maintenance and active LTS
node-version: [14, 16, 18]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install with yarn
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
yarn install --ignore-engines

- name: Run tests
run: |
yarn run test
test:
uses: fastify/workflows/.github/workflows/plugins-ci-package-manager.yml@v3