⬆️ Update AWS packages #321
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Libraries | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: ['master'] | |
paths: | |
- .github/ci-libraries.yml | |
- packages/** | |
- package.json | |
- pnpm-*.yaml | |
- turbo.json | |
jobs: | |
build: | |
name: Validate build [Node.js ${{ matrix.node-version }}] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Setup job environment | |
id: setup-job | |
uses: ./.github/actions/setup-job-env | |
with: | |
cache-key: node-${{ matrix.node-version }} | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: pnpm build --filter="./packages/**" | |
test-core-lib: | |
name: Test core lib [Node.js ${{ matrix.node-version }}] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Setup job environment | |
id: setup-job | |
uses: ./.github/actions/setup-job-env | |
with: | |
cache-key: node-${{ matrix.node-version }} | |
node-version: ${{ matrix.node-version }} | |
- name: Test linting, formatting and import sorting | |
run: pnpm run ci --filter=@ocoda/event-sourcing | |
- name: Test | |
run: | | |
if [ ${{ matrix.node-version }} == '22.x' ]; then | |
pnpm test:cov --filter=@ocoda/event-sourcing | |
else | |
pnpm test --filter=@ocoda/event-sourcing | |
fi | |
- name: Upload coverage | |
if: ${{ matrix.node-version == '22.x' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: packages/core/coverage | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: core | |
test-integration-libs: | |
name: Test ${{ matrix.database }} lib [Node.js ${{ matrix.node-version }}] | |
runs-on: ubuntu-latest | |
needs: [test-core-lib] | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
database: [mongodb, dynamodb, postgres, mariadb] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Start database | |
run: docker compose up -d ${{ matrix.database }} | |
- name: Setup job environment | |
id: setup-job | |
uses: ./.github/actions/setup-job-env | |
with: | |
cache-key: node-${{ matrix.node-version }} | |
node-version: ${{ matrix.node-version }} | |
- name: Test linting, formatting and import sorting | |
run: pnpm run ci --filter=@ocoda/event-sourcing-${{ matrix.database }} | |
- name: Test | |
run: | | |
if [ ${{ matrix.node-version }} == '22.x' ]; then | |
pnpm test:cov --filter=@ocoda/event-sourcing-${{ matrix.database }} | |
else | |
pnpm test --filter=@ocoda/event-sourcing-${{ matrix.database }} | |
fi | |
- name: Upload coverage | |
if: ${{ matrix.node-version == '22.x' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: packages/integration/${{ matrix.database }}/coverage | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: integrations | |
merge-check: | |
name: Merge check | |
needs: [build, test-core-lib, test-integration-libs] | |
uses: ./.github/workflows/merge-check.yml | |
with: | |
conditions: ${{ needs.build.result == 'success' && | |
needs.test-core-lib.result == 'success' && | |
needs.test-integration-libs.result == 'success' }} |