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

chore: merge back CI jobs using tj-actions/changed-files #11548

Merged
merged 8 commits into from Jan 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -29,7 +29,34 @@ concurrency:
cancel-in-progress: true

jobs:
build:
diff:
timeout-minutes: 2
runs-on: ubuntu-latest
name: "Diff files"
outputs:
runTest: ${{ steps.skip-tests-files.outputs.only_changed != 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Assume PRs are less than 50 commits
fetch-depth: 50

- name: Get changed files
id: skip-tests-files
uses: tj-actions/changed-files@v35
ArnaudBarre marked this conversation as resolved.
Show resolved Hide resolved
with:
files: |
docs/**
.github/**
!.github/workflows/ci.yml
packages/create-vite/**
!packages/create-vite/__tests__/**
**/*.md
sapphi-red marked this conversation as resolved.
Show resolved Hide resolved

test:
needs: diff
if: ${{ needs.diff.outputs.runTest }}
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -98,18 +125,15 @@ jobs:
run: pnpm playwright install chromium

- name: Build
if: steps.changed-files.outputs.only_changed != 'true'
run: pnpm run build

- name: Test unit
run: pnpm run test-unit

- name: Test serve
if: steps.changed-files.outputs.only_changed != 'true'
run: pnpm run test-serve

- name: Test build
if: steps.changed-files.outputs.only_changed != 'true'
run: pnpm run test-build

lint:
Expand Down