Files
Compass/.github/workflows/cd-api.yml
Okechi Jones-Williams 00c6f2566e [Syncing] Small PR to lay foundations for Testing filtering and to sync with upstream (#51)
* Added Database checks to the onboarding flow

* Added compatibility page setup
Added more compatibility questions

* Finished up the onboarding flow suite
Added compatibility question tests and verifications
Updated tests to cover Keywords and Headline changes recently made
Updated tests to cover all of the big5 personality traits

* .

* Fix: Merge conflict

* .

* Fix: Added fix for None discriptive error issue #36
Updated signUp.spec.ts to use new fixture
Updated Account information variable names
Deleted "deleteUserFixture.ts" as it was incorporated into the "base.ts" file

* Linting and Prettier

* Minor cleaning

* Organizing helper func

* Added Google account to the Onboarding flow

* Added account cleanup for google accounts

* Started work on Sign-in tests
Updated seedDatabase.ts to throw an error if the user already exists, to also add display names and usernames so they seedUser func acts like a normal basic user
Some organising of the google auth code

* Linting and Prettier

* Added checks to the deleteUser func to check if the accout exists
Added account deletion checks

* Linting and Prettier

* Formatting update, fixed homePage locator for signin

* .

* .

* .

* Coderabbitai fix's

* Fix

* Improve test utilities and stabilize onboarding flow tests

* Changes requested

* Changed POM/Fixture structure to use an app class to instantiate the page objects

* Apply suggestion from @MartinBraquet

* Delete .vscode/settings.json

* Apply suggestion from @MartinBraquet

* Apply suggestion from @MartinBraquet

* Apply suggestion from @MartinBraquet

* Linting and Prettier

* Updated People page

* Fix app.ts

* Updated peoplePage.ts: continued adding functions to use filters
Updated filters.tsx: added data testid

* Coderabbitai fix's

* .

* Explanded seeding to better reflect the different types of profiles

* Updated People page
Added data test attributes to search.tsx and profile-grid.tsx

* Lint and Prettier

* Test renamed

* CodeRabbit Suggestions

* .

* Apply suggestions from code review

Co-authored-by: Martin Braquet <martin.braquet@gmail.com>

---------

Co-authored-by: MartinBraquet <martin.braquet@gmail.com>
2026-05-20 20:02:00 +02:00

77 lines
2.1 KiB
YAML

name: API Release
on:
push:
branches: [main, master]
paths:
- 'backend/api/package.json'
- '.github/workflows/cd-api.yml'
jobs:
check-version:
name: Check Version
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Read current version
id: current
run: |
current=$(jq -r '.version' backend/api/package.json)
echo "version=$current" >> $GITHUB_OUTPUT
- name: Read previous version
id: previous
run: |
if git show HEAD^:backend/api/package.json >/dev/null 2>&1; then
previous=$(git show HEAD^:backend/api/package.json | jq -r '.version')
else
previous="none"
fi
echo "version=$previous" >> $GITHUB_OUTPUT
- name: Compare versions
id: check
run: |
echo "current=${{ steps.current.outputs.version }}"
echo "previous=${{ steps.previous.outputs.version }}"
if [ "${{ steps.current.outputs.version }}" = "${{ steps.previous.outputs.version }}" ]; then
echo "Version unchanged. Skipping deploy."
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: check-version
if: needs.check-version.outputs.changed == 'true'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Install gcloud CLI
uses: google-github-actions/setup-gcloud@v2
with:
project_id: compass-130ba
- name: Configure Docker for Artifact Registry
run: gcloud auth configure-docker us-west1-docker.pkg.dev --quiet
- name: Run deploy script
run: |
chmod +x backend/api/deploy-api.sh
backend/api/deploy-api.sh