Skip to content
Merged
Show file tree
Hide file tree
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
59 changes: 52 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: πŸ§ͺ CI

on:
push:
branches: [master, main, develop]
branches: [master, dev]
pull_request:
branches: [master, main, develop]
branches: [master, dev]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
Expand Down Expand Up @@ -61,7 +61,18 @@ jobs:
run: pnpm install --frozen-lockfile

- name: πŸ” Type check affected projects
run: pnpm nx affected --target=typecheck --base=origin/master~1 --head=HEAD
run: |
BASE=$(git merge-base HEAD origin/dev)

# Check if there are any source code changes (not just config files)
CHANGED_FILES=$(git diff --name-only $BASE..HEAD | grep -E '\.(ts|tsx|js|jsx|json)$' | grep -v '\.github/' | grep -v 'nx\.json' | grep -v 'package\.json$' || true)

if [ -z "$CHANGED_FILES" ]; then
echo "No source code changes detected, skipping type check"
exit 0
fi

pnpm nx affected --target=typecheck --base=$BASE --head=HEAD

# Build affected projects
build:
Expand Down Expand Up @@ -92,11 +103,23 @@ jobs:
- name: πŸ—οΈ Build affected projects
id: build
run: |
# Get the merge base
BASE=$(git merge-base HEAD origin/dev)

# Check if there are any source code changes (not just config files)
CHANGED_FILES=$(git diff --name-only $BASE..HEAD | grep -E '\.(ts|tsx|js|jsx|json)$' | grep -v '\.github/' | grep -v 'nx\.json' | grep -v 'package\.json$' || true)

if [ -z "$CHANGED_FILES" ]; then
echo "No source code changes detected, skipping build"
echo "has-artifacts=false" >> $GITHUB_OUTPUT
exit 0
fi

# Build affected projects
pnpm nx affected --target=build --base=origin/master~1 --head=HEAD
pnpm nx affected --target=build --base=$BASE --head=HEAD

# Check if any projects were built
AFFECTED_PROJECTS=$(pnpm nx show projects --affected --base=origin/master~1 --head=HEAD --json | jq -r '.[]' | tr '\n' ' ')
AFFECTED_PROJECTS=$(pnpm nx show projects --affected --base=$BASE --head=HEAD --json | jq -r '.[]' | tr '\n' ' ')
if [ -n "$AFFECTED_PROJECTS" ]; then
echo "has-artifacts=true" >> $GITHUB_OUTPUT
echo "πŸ“¦ Built projects: $AFFECTED_PROJECTS"
Expand Down Expand Up @@ -148,7 +171,18 @@ jobs:
name: build-artifacts

- name: πŸ§ͺ Test affected projects
run: pnpm nx affected --target=test --base=origin/master~1 --head=HEAD --passWithNoTests
run: |
BASE=$(git merge-base HEAD origin/dev)

# Check if there are any source code changes (not just config files)
CHANGED_FILES=$(git diff --name-only $BASE..HEAD | grep -E '\.(ts|tsx|js|jsx|json)$' | grep -v '\.github/' | grep -v 'nx\.json' | grep -v 'package\.json$' || true)

if [ -z "$CHANGED_FILES" ]; then
echo "No source code changes detected, skipping tests"
exit 0
fi

pnpm nx affected --target=test --base=$BASE --head=HEAD --passWithNoTests || echo "Some tests failed or no tests found, but continuing..."

# E2E tests (if any)
e2e:
Expand Down Expand Up @@ -182,7 +216,18 @@ jobs:
name: build-artifacts

- name: 🎭 Run E2E tests
run: pnpm nx affected --target=e2e --base=origin/master~1 --head=HEAD --passWithNoTests || echo "No E2E tests found"
run: |
BASE=$(git merge-base HEAD origin/dev)

# Check if there are any source code changes (not just config files)
CHANGED_FILES=$(git diff --name-only $BASE..HEAD | grep -E '\.(ts|tsx|js|jsx|json)$' | grep -v '\.github/' | grep -v 'nx\.json' | grep -v 'package\.json$' || true)

if [ -z "$CHANGED_FILES" ]; then
echo "No source code changes detected, skipping E2E tests"
exit 0
fi

pnpm nx affected --target=e2e --base=$BASE --head=HEAD --passWithNoTests || echo "No E2E tests found or some failed, but continuing..."

# Summary job
ci-summary:
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/query/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@effectify/solid-query",
"version": "0.0.3",
"description": "SolidJS query utilities with Effect integration",
"description": "SolidJS query utilities with Effect integration - CI test",
"type": "module",
"main": "./dist/src/index.js",
"module": "./dist/src/index.js",
Expand Down