Build(deps-dev): bump the minor-patch group across 1 directory with 4… #494
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
suite: | |
required: true | |
description: "The test suite name: e2e, default" | |
default: "default" | |
type: string | |
workflow_call: | |
inputs: | |
suite: | |
required: true | |
description: "The test suite name: e2e, default" | |
default: "default" | |
type: string | |
secrets: | |
ORCHESTRATE_API_KEY: | |
required: true | |
ORCHESTRATE_IDENTITY_API_KEY: | |
required: true | |
ORCHESTRATE_IDENTITY_METRICS_KEY: | |
required: true | |
ORCHESTRATE_IDENTITY_URL: | |
required: true | |
jobs: | |
typescript: | |
name: Typescript | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: ${{ (inputs.suite || 'default') == 'e2e' && 1 || 4 }} | |
matrix: | |
node-version: ["18", "20"] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Write Env | |
shell: pwsh | |
run: | | |
if ("${{ secrets.ORCHESTRATE_API_KEY }}" -eq "") { | |
throw "ORCHESTRATE_API_KEY secret is required for this workflow." | |
} | |
"ORCHESTRATE_API_KEY=${{ secrets.ORCHESTRATE_API_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 | |
"ORCHESTRATE_IDENTITY_API_KEY=${{ secrets.ORCHESTRATE_IDENTITY_API_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_METRICS_KEY=${{ secrets.ORCHESTRATE_IDENTITY_METRICS_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_URL=${{ secrets.ORCHESTRATE_IDENTITY_URL }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_LOCAL_HASHING_URL=http://127.0.0.1:7002" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
- name: Install dependencies | |
working-directory: typescript | |
run: npm ci | |
- name: Default Tests | |
if: ${{ (inputs.suite || 'default') == 'default' }} | |
working-directory: typescript | |
shell: pwsh | |
run: npm run test | |
- name: Run Local Hashing | |
if: ${{ (inputs.suite || 'default') == 'e2e' }} | |
run: docker run -d -p 7002:7002 -e HASH__KEY=${{ secrets.TESTING_HASH_KEY }} --cap-drop ALL careevolution/bmpi-hashing-service:latest | |
- name: E2E Tests | |
if: ${{ (inputs.suite || 'default') == 'e2e' }} | |
working-directory: typescript | |
shell: pwsh | |
run: npm run test:e2e | |
python: | |
name: Python | |
runs-on: ubuntu-latest | |
needs: | |
- typescript | |
strategy: | |
fail-fast: true | |
max-parallel: ${{ (inputs.suite || 'default') == 'e2e' && 1 || 4 }} | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install Python | |
id: setup-python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Remove Non-Default Lock File | |
working-directory: python | |
id: remove-lock | |
if: matrix.python-version != '3.9' | |
run: rm ./poetry.lock | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Write Env | |
shell: pwsh | |
run: | | |
if ("${{ secrets.ORCHESTRATE_API_KEY }}" -eq "") { | |
throw "ORCHESTRATE_API_KEY secret is required for this workflow." | |
} | |
"ORCHESTRATE_API_KEY=${{ secrets.ORCHESTRATE_API_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 | |
"ORCHESTRATE_IDENTITY_API_KEY=${{ secrets.ORCHESTRATE_IDENTITY_API_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_METRICS_KEY=${{ secrets.ORCHESTRATE_IDENTITY_METRICS_KEY }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_URL=${{ secrets.ORCHESTRATE_IDENTITY_URL }}" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
"ORCHESTRATE_IDENTITY_LOCAL_HASHING_URL=http://127.0.0.1:7002" | Out-File -FilePath ./.env -Encoding utf8 -Append | |
- name: Copy Local README | |
run: cp ./README.md python/README.md | |
- name: Install Dependencies | |
working-directory: python | |
run: poetry install --no-interaction --with "main, test" | |
- name: Lint | |
working-directory: python | |
run: poetry run black --check . | |
- name: Run Local Hashing | |
if: ${{ (inputs.suite || 'default') == 'e2e' }} | |
run: docker run -d -p 7002:7002 -e HASH__KEY=${{ secrets.TESTING_HASH_KEY }} --cap-drop ALL careevolution/bmpi-hashing-service:latest | |
- name: Test | |
working-directory: python | |
run: poetry run pytest -m "${{ (inputs.suite || 'default') }}" |