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
5 changes: 5 additions & 0 deletions .github/workflows/deploy-Dataspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- dev
- main
# Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy
paths-ignore:
- '**.md'
- 'docs/**'
- 'cds_docs_femhealth/**'

# Prevent two deploys to the same environment from racing each other and
# corrupting the releases/ directory or the .last_good / .rollback_target markers.
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-IDS-Dataspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Update IDS-DRR Dataspace
on:
push:
branches: ['dev']
# Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy
paths-ignore:
- '**.md'
- 'docs/**'
- 'cds_docs_femhealth/**'
env:
KEYCLOAK_CLIENT_ID: ${{secrets.KEYCLOAK_CLIENT_ID}}
KEYCLOAK_CLIENT_SECRET: ${{secrets.KEYCLOAK_CLIENT_SECRET}}
Expand Down
37 changes: 35 additions & 2 deletions .github/workflows/pr-gate.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Full test suite against dev for every PR into main. Required by branch
# protection on main, so a PR merges (and prod deploys) only once it's green.
# Full test suite against dev for every PR into main. Branch protection on main
# requires the "PR Gate" job, so a PR merges (and prod deploys) only once it's green.
# dev already runs the PR's code (it was merged to dev first).
#
# Docs-only PRs (Markdown, docs/, Read the Docs source) skip the suite. "PR Gate"
# still reports, so they stay mergeable. A skipped required check would block them.
name: PR Gate

on:
Expand All @@ -12,8 +15,27 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
name: Detect code changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- id: filter
env:
GH_TOKEN: ${{ github.token }}
run: |
code=$(gh api --paginate "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" \
--jq '.[].filename' | grep -vE '\.md$|^docs/|^cds_docs_femhealth/' || true)
echo "code=$([ -n "$code" ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
[ -n "$code" ] && printf 'Code changes:\n%s\n' "$code" || echo "Docs-only PR: skipping the full suite"

full-suite:
name: Full Suite (dev)
needs: changes
if: needs.changes.outputs.code == 'true'
uses: CivicDataLab/CivicDataSpace-test/.github/workflows/run-smoke.yml@CI
with:
suite: full
Expand All @@ -25,3 +47,14 @@ jobs:
TEST_EMAIL_2: ${{ secrets.TEST_EMAIL_2 }}
TEST_PASSWORD_2: ${{ secrets.TEST_PASSWORD_2 }}
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_CLIENT_SECRET }}

gate:
name: PR Gate
needs: [changes, full-suite]
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo "changes=${{ needs.changes.result }} full-suite=${{ needs.full-suite.result }}"
[ "${{ needs.changes.result }}" = success ] || exit 1
case "${{ needs.full-suite.result }}" in success|skipped) ;; *) exit 1 ;; esac
10 changes: 10 additions & 0 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ name: Build Status
on:
push:
branches: ['dev']
# Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy
paths-ignore:
- '**.md'
- 'docs/**'
- 'cds_docs_femhealth/**'
pull_request:
branches: ['dev']
# Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy
paths-ignore:
- '**.md'
- 'docs/**'
- 'cds_docs_femhealth/**'

jobs:
build:
Expand Down
Loading