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(v3): test and lint v-next packages lazily #5564

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ci: lint and test v-next packages lazily
galargh committed Aug 2, 2024
commit 0cc2836dc85d8bac6a79a03252a34a9c18eee8ac
35 changes: 32 additions & 3 deletions .github/workflows/v-next-ci.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ on:
branches:
- "**"
paths:
- ".github/workflows/v-next-ci.yml"
- "v-next/**"
- "config-v-next/**"
workflow_dispatch:
@@ -42,16 +43,42 @@ jobs:
name: List packages
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.list.outputs.packages }}
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
- id: list
- uses: actions/setup-node@v4
with:
node-version: 22
- run: yq -p yaml -o json pnpm-lock.yaml | tee pnpm-lock.json
- id: generate
env:
PACKAGE_IGNORE: |
[
".",
"packages/",
"v-next/example-project"
]
COMMON_FILTERS: |
[
".github/workflows/v-next-ci.yml",
"config-v-next/**"
]
run: |
echo "packages=$(ls -d v-next/* | xargs -n 1 basename | grep -v example-project | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "filters<<EOF" >> $GITHUB_OUTPUT
node scripts/generate-filters.js |
yq -Po yaml 'with_entries(.key |= sub("^v-next/", ""))' |
tee -a $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: ${{ steps.generate.outputs.filters }}

lint:
needs: list-packages

if: needs.list-packages.outputs.packages != '[]'

strategy:
fail-fast: false
matrix:
@@ -83,6 +110,8 @@ jobs:
ci:
needs: list-packages

if: needs.list-packages.outputs.packages != '[]'

strategy:
fail-fast: false
matrix: