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
79 changes: 19 additions & 60 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ permissions:
on:
push:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
# pull_request trigger only needed for protect-nyc-config (uses PR API).
# All other jobs run on push only — GitHub shows push checks on PRs too.
types: [opened, synchronize, ready_for_review, reopened, edited]

env:
CI_BUILD_NUM: ${{ github.run_id }}
CI_BRANCH: ${{ github.ref_name }}
HLX_AWS_REGION: ${{ secrets.AWS_REGION }}
jobs:
protect-nyc-config:
validate-pr-title:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

protect-nyc-config:
if: github.event_name == 'pull_request' && github.event.action != 'edited'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
Expand All @@ -33,7 +43,7 @@ jobs:
uses: ./.github/actions/protect-nyc-config

build:
if: github.event_name == 'push'
if: github.event_name == 'push' || github.event.action != 'edited'
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -58,60 +68,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}

it-dynamo:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v5
with:
persist-credentials: 'false'

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Node & NPM
uses: ./.github/actions/setup-node-npm
env:
MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN: ${{ secrets.MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN }}

- name: Run DynamoDB Integration Tests
run: npx mocha --require test/it/dynamo/harness.js --timeout 30000 'test/it/dynamo/**/*.test.js'

it-postgres:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 15
steps:
- name: Check out
uses: actions/checkout@v5
with:
persist-credentials: 'false'

- name: Configure AWS credentials (ECR pull)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ECR_PULL_ROLE_ARN }}
aws-region: us-east-1

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2

- name: Setup Node & NPM
uses: ./.github/actions/setup-node-npm
env:
MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN: ${{ secrets.MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN }}

- name: Run PostgreSQL Integration Tests
run: npx mocha --require test/it/postgres/harness.js --timeout 30000 'test/it/postgres/**/*.test.js'

semantic-release:
runs-on: ubuntu-latest
needs: [build, it-dynamo, it-postgres]
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Check out
Expand Down Expand Up @@ -142,7 +101,7 @@ jobs:

deploy-stage:
runs-on: ubuntu-latest
needs: [build, it-dynamo, it-postgres]
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Check out
Expand All @@ -168,7 +127,7 @@ jobs:

upload-build-artifacts:
runs-on: ubuntu-latest
needs: [build, it-dynamo, it-postgres]
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Check out
Expand Down Expand Up @@ -206,7 +165,7 @@ jobs:

branch-deploy:
runs-on: ubuntu-latest
needs: [build, it-dynamo, it-postgres]
needs: build
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
steps:
- name: Check out
Expand Down
4 changes: 4 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ return internalServerError('Internal error occurred');

## Development Workflow

### Conventional Commits
- This repo uses conventional commits for semantic-release (version bumps) and changelog generation
- PR title or merge commit must follow the conventional commit style (e.g. `feat:`, `fix:`, `docs:`)

### Adding a New Endpoint

1. Define OpenAPI spec in `docs/openapi/paths/*.yaml`
Expand Down
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.