Skip to content

[data-1613]

[data-1613] #4343

name: ALP DB Credentials unit tests
on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
push:
branches:
- develop
- "release/*"
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
test-alp-db-credentials:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/[email protected]
id: check_file_changed
with:
filters: |
db_credentials_changed:
- 'functions/alp-db-credentials/**'
- name: Determine condition to run
env:
SHOULD_WF_RUN: ${{ env.BRANCH_NAME == 'develop' || contains('release/', env.BRANCH_NAME) || steps.check_file_changed.outputs.db_credentials_changed == 'True' }}
run: |
echo WF_RUN=$SHOULD_WF_RUN | tee -a $GITHUB_ENV | tee -a $GITHUB_STEP_SUMMARY
- uses: denoland/setup-deno@v2
name: Setup node if files have changed
with:
deno-version: v2.1.2
if: env.WF_RUN == 'true'
- name: Run unit tests if files have changed
if: env.WF_RUN == 'true'
run: |
cd functions/alp-db-credentials
deno install
deno task test