Skip to content

ci: add pack job dependency to test workflow step #15

ci: add pack job dependency to test workflow step

ci: add pack job dependency to test workflow step #15

Workflow file for this run

name: Node CI
on:
push:
pull_request:
jobs:
pack:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: ⬇️ Check out code
uses: actions/checkout@v4
- name: 🟢 Enable Corepack
run: corepack enable
- name: 🟢 Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: 📦 Install deps, build, pack
run: |
yarn install --frozen-lockfile
yarn build
yarn pack --out %s-%v.tgz
env:
CI: true
- name: 📤 Upload package artifact
uses: actions/upload-artifact@v4
with:
name: strapi-plugin-imagekit-package
path: strapi-plugin-imagekit-*.tgz
test:
runs-on: ubuntu-latest
needs: pack
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: ⬇️ Check out code
uses: actions/checkout@v4
- name: 🟢 Enable Corepack
run: corepack enable
- name: 🟢 Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: 📦 Install deps, build
run: |
yarn install --frozen-lockfile
yarn build
env:
CI: true
- name: 🧪 Run tests
run: yarn test:unit:ci