mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 20:27:58 -05:00
[Feat] - Exclude *.md files from triggering CI workflow (#370)
* did .md exclusion rules for workflow files * test md change * add markdown exclusion to pull_request event in main.yml * modify main.yml to ignore *.md file on pull_request * test if main.yml will ignore yml changes * adjust paths exclusion for *.md * test commit * test commit * alternate way for main.yml to filter out .md * test changes to main.yml * test change to main.yml * add compound dorny/path-filter param * fix duplicate workflow id * removed *.yml test value * adjust pr 370 as per comments 1 + test markdown change * revert *.md test change * clarify main.yml comments * test * test * flip to is-markdown-only * Revert "flip to is-markdown-only" This reverts commit 5496a1b08384bcf034264a25322c20456c18df1c. * trial push down * test * test * test * test * test * test * test * remove *.yml * DO NOT MERGE THIS COMMIT - *.yml for demo purpose * remove *.yml after demo done * rename not-markdown-only to has-changes-other-than-markdown * change to has-code-changes * DO NOT MERGE - *.yml test * Revert "DO NOT MERGE - *.yml test" This reverts commit 807d71b3597204497d21afc2c51b81f68a92f63f. * add docs to exclusion list, replace image extensions * DO NOT MERGE - test ci * Revert "DO NOT MERGE - test ci" This reverts commit ee8831fe6259967d10ce9aa5c6db96e4ba808d82. * change to has-changes-requiring-build --------- Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/bridge-ui-e2e-tests.yml
vendored
2
.github/workflows/bridge-ui-e2e-tests.yml
vendored
@@ -6,11 +6,13 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
- '!bridge-ui/**/*.md'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
- '!bridge-ui/**/*.md'
|
||||
|
||||
jobs:
|
||||
run-e2e-tests:
|
||||
|
||||
2
.github/workflows/bridge-ui-publish.yml
vendored
2
.github/workflows/bridge-ui-publish.yml
vendored
@@ -6,11 +6,13 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
- '!bridge-ui/**/*.md'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'bridge-ui/**'
|
||||
- '!bridge-ui/**/*.md'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
|
||||
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@@ -14,6 +14,10 @@ name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
# '!**.md' will not work by itself to exclude *.md files. See https://github.com/orgs/community/discussions/25369
|
||||
- '**'
|
||||
- '!**.md'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
||||
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
||||
traces-api-facade: ${{ steps.filter.outputs.traces-api-facade }}
|
||||
transaction-exclusion-api: ${{ steps.filter.outputs.transaction-exclusion-api }}
|
||||
finalized-tag-updater: ${{ steps.filter.outputs.finalized-tag-updater }}
|
||||
has-changes-requiring-build: ${{ steps.filter-out.outputs.has-changes-requiring-build }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -110,10 +111,23 @@ jobs:
|
||||
- 'finalized-tag-updater/**'
|
||||
- '.github/workflows/main.yml'
|
||||
- '.github/workflows/finalized-tag-updater-github-release.yml'
|
||||
- name: Filter out commit changes
|
||||
uses: dorny/paths-filter@v3
|
||||
id: filter-out
|
||||
with:
|
||||
base: ${{ github.ref }}
|
||||
list-files: "json"
|
||||
filters: |
|
||||
has-changes-requiring-build:
|
||||
- '!**/*.md'
|
||||
- '!docs/**'
|
||||
# Enables us to exclude changes in multiple file types if required
|
||||
predicate-quantifier: 'every'
|
||||
|
||||
check-and-tag-images:
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes ]
|
||||
uses: ./.github/workflows/reuse-check-images-tags-and-push.yml
|
||||
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
last_commit_tag: ${{ needs.store-image-name-and-tags.outputs.last_commit_tag }}
|
||||
@@ -128,6 +142,7 @@ jobs:
|
||||
manual-docker-build-and-e2e-tests:
|
||||
runs-on: [self-hosted, ubuntu-20.04, X64, small]
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
|
||||
if: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
|
||||
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
|
||||
concurrency:
|
||||
group: manual-docker-build-and-e2e-tests-${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -166,7 +181,7 @@ jobs:
|
||||
|
||||
testing:
|
||||
needs: [ store-image-name-and-tags, filter-commit-changes, check-and-tag-images ]
|
||||
if: ${{ always() }}
|
||||
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }}
|
||||
uses: ./.github/workflows/testing.yml
|
||||
with:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
@@ -179,7 +194,8 @@ jobs:
|
||||
|
||||
run-e2e-tests-geth-tracing:
|
||||
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
|
||||
if: ${{ always() && needs.docker-build.result == 'success' }}
|
||||
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
|
||||
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
|
||||
concurrency:
|
||||
group: run-e2e-tests-geth-tracing-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
@@ -188,11 +204,13 @@ jobs:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
tracing-engine: 'geth'
|
||||
e2e-tests-logs-dump: true
|
||||
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
|
||||
secrets: inherit
|
||||
|
||||
run-e2e-tests:
|
||||
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests ]
|
||||
if: ${{ always() && needs.docker-build.result == 'success' }}
|
||||
needs: [ store-image-name-and-tags, docker-build, manual-docker-build-and-e2e-tests, filter-commit-changes ]
|
||||
# Make this execute for has-changes-requiring-build == 'false' so that we can get to the required job @ which is in reuse-run-e2e-tests.yml
|
||||
if: ${{ always() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'false' || needs.docker-build.result == 'success' }}
|
||||
concurrency:
|
||||
group: run-e2e-tests-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
@@ -201,6 +219,7 @@ jobs:
|
||||
commit_tag: ${{ needs.store-image-name-and-tags.outputs.commit_tag }}
|
||||
tracing-engine: 'besu'
|
||||
e2e-tests-logs-dump: true
|
||||
has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}
|
||||
secrets: inherit
|
||||
|
||||
publish-images-after-run-tests-success-on-main:
|
||||
|
||||
5
.github/workflows/reuse-run-e2e-tests.yml
vendored
5
.github/workflows/reuse-run-e2e-tests.yml
vendored
@@ -49,6 +49,8 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
has-changes-requiring-build:
|
||||
type: string
|
||||
outputs:
|
||||
tests_outcome:
|
||||
value: ${{ jobs.run-e2e-tests.outputs.tests_outcome }}
|
||||
@@ -59,7 +61,10 @@ on:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
# Required job
|
||||
run-e2e-tests:
|
||||
# We can only use conditionals, and not path filters to 'successfully' skip a required job - https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
if: ${{ inputs.has-changes-requiring-build == 'true' }}
|
||||
env:
|
||||
COORDINATOR_TAG: ${{ inputs.commit_tag }}
|
||||
POSTMAN_TAG: ${{ inputs.commit_tag }}
|
||||
|
||||
6
.github/workflows/run-smc-tests.yml
vendored
6
.github/workflows/run-smc-tests.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
- 'contracts/**'
|
||||
- 'testdata/**'
|
||||
- 'prover/**'
|
||||
- '!contracts/**/*.md'
|
||||
- '!testdata/**/*.md'
|
||||
- '!prover/**/*.md'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -13,6 +16,9 @@ on:
|
||||
- 'contracts/**'
|
||||
- 'testdata/**'
|
||||
- 'prover/**'
|
||||
- '!contracts/**/*.md'
|
||||
- '!testdata/**/*.md'
|
||||
- '!prover/**/*.md'
|
||||
|
||||
env:
|
||||
GOPROXY: "https://proxy.golang.org"
|
||||
|
||||
Reference in New Issue
Block a user