Skip to content

Sync repo

Sync repo #21

name: Run acceptance tests on affected packages
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
Run-Acceptance-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOWS_TOKEN }}
- name: Fetch commits
run: |
git fetch --deepen=1000
- name: Detect affected packages
run: ./infrastructure/scripts/workflows/detect-changes.sh
- name: Setup Node.js
if: env.SKIP != 'true'
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Cache node modules
if: env.SKIP != 'true'
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup dependencies
if: env.SKIP != 'true'
run: npm run setupDependencies
- name: Up Services
if: env.SKIP != 'true'
run: |
set -euo pipefail
npm run pipeline:test:acceptance:external:docker:up
echo "servicesUp=true" >> $GITHUB_ENV
- name: Install waitForRabbitMq dependencies
if: env.SKIP != 'true'
run: |
cd infrastructure/scripts/rabbitMq
npm install --save-dev
cd -
- name: Run tests
if: env.SKIP != 'true'
timeout-minutes: 5
run: |
./infrastructure/scripts/workflows/trigger-tests.sh pipeline:test:acceptance:run
env:
CHANGED: ${{ env.CHANGED }}
- name: Down RabbitMq
if: env.servicesUp == 'true'
run: |
npm run pipeline:test:acceptance:docker:down