mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
Merge pull request #1546 from selfxyz/jcortejoso/remove-path-filter-qre
Remove path filters in workflow
This commit is contained in:
2
.github/workflows/circuits.yml
vendored
2
.github/workflows/circuits.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
||||
echo "Running for ${{ github.base_ref }} - no path filter"
|
||||
else
|
||||
# For dev branch, check if circuits files changed
|
||||
# Fetch the base branch to ensure it's available for comparison
|
||||
git fetch origin ${{ github.base_ref }} --depth=1
|
||||
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
|
||||
echo "Error: Failed to diff against base branch"
|
||||
exit 1
|
||||
|
||||
2
.github/workflows/contracts.yml
vendored
2
.github/workflows/contracts.yml
vendored
@@ -29,6 +29,8 @@ jobs:
|
||||
echo "Running for ${{ github.base_ref }} - no path filter"
|
||||
else
|
||||
# For dev branch, check if contracts or common files changed
|
||||
# Fetch the base branch to ensure it's available for comparison
|
||||
git fetch origin ${{ github.base_ref }} --depth=1
|
||||
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
|
||||
echo "Error: Failed to diff against base branch"
|
||||
exit 1
|
||||
|
||||
53
.github/workflows/core-sdk-ci.yml
vendored
53
.github/workflows/core-sdk-ci.yml
vendored
@@ -2,14 +2,48 @@ name: Core SDK CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "sdk/core/**"
|
||||
- "common/**"
|
||||
- ".github/workflows/core-sdk-ci.yml"
|
||||
- ".github/actions/**"
|
||||
branches:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check_changes:
|
||||
runs-on: ubuntu-slim
|
||||
outputs:
|
||||
should_run: ${{ steps.filter.outputs.should_run }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check if should run
|
||||
id: filter
|
||||
run: |
|
||||
set -e
|
||||
if [[ "${{ github.base_ref }}" == "main" ]] || [[ "${{ github.base_ref }}" == "staging" ]]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
echo "Running for ${{ github.base_ref }} - no path filter"
|
||||
else
|
||||
# For dev branch, check if relevant files changed
|
||||
# Fetch the base branch to ensure it's available for comparison
|
||||
git fetch origin ${{ github.base_ref }} --depth=1
|
||||
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
|
||||
echo "Error: Failed to diff against base branch"
|
||||
exit 1
|
||||
}
|
||||
if echo "$CHANGED_FILES" | grep -qE "^(sdk/core/|common/|\.github/workflows/core-sdk-ci\.yml|\.github/actions/)"; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
echo "Running for dev - relevant files changed"
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
echo "Skipping for dev - no relevant files changed"
|
||||
fi
|
||||
fi
|
||||
|
||||
build:
|
||||
needs: check_changes
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -34,7 +68,8 @@ jobs:
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
@@ -63,7 +98,8 @@ jobs:
|
||||
|
||||
types:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
@@ -92,7 +128,8 @@ jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
|
||||
49
.github/workflows/qrcode-sdk-ci.yml
vendored
49
.github/workflows/qrcode-sdk-ci.yml
vendored
@@ -14,15 +14,45 @@ on:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
paths:
|
||||
- "sdk/qrcode/**"
|
||||
- "common/**"
|
||||
- ".github/workflows/qrcode-sdk-ci.yml"
|
||||
- ".github/actions/**"
|
||||
|
||||
jobs:
|
||||
check_changes:
|
||||
runs-on: ubuntu-slim
|
||||
outputs:
|
||||
should_run: ${{ steps.filter.outputs.should_run }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check if should run
|
||||
id: filter
|
||||
run: |
|
||||
set -e
|
||||
if [[ "${{ github.base_ref }}" == "main" ]] || [[ "${{ github.base_ref }}" == "staging" ]]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
echo "Running for ${{ github.base_ref }} - no path filter"
|
||||
else
|
||||
# For dev branch, check if relevant files changed
|
||||
# Fetch the base branch to ensure it's available for comparison
|
||||
git fetch origin ${{ github.base_ref }} --depth=1
|
||||
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) || {
|
||||
echo "Error: Failed to diff against base branch"
|
||||
exit 1
|
||||
}
|
||||
if echo "$CHANGED_FILES" | grep -qE "^(sdk/qrcode/|common/|\.github/workflows/qrcode-sdk-ci\.yml|\.github/actions/)"; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
echo "Running for dev - relevant files changed"
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
echo "Skipping for dev - no relevant files changed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Build dependencies once and cache for other jobs
|
||||
build:
|
||||
needs: check_changes
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
@@ -83,7 +113,8 @@ jobs:
|
||||
# Quality checks job
|
||||
quality-checks:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Read and sanitize Node.js version
|
||||
@@ -151,7 +182,8 @@ jobs:
|
||||
# Build verification job
|
||||
build-verification:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Read and sanitize Node.js version
|
||||
@@ -213,7 +245,8 @@ jobs:
|
||||
# Integration test job
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
needs: [check_changes, build]
|
||||
if: github.event.pull_request.draft == false && needs.check_changes.outputs.should_run == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Read and sanitize Node.js version
|
||||
|
||||
Reference in New Issue
Block a user