Skip to content

Bump path-to-regexp and express in /backend #2098

Bump path-to-regexp and express in /backend

Bump path-to-regexp and express in /backend #2098

Workflow file for this run

name: Build, Test, & Deploy
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
jobs:
frontend:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nkalupahana/baseline')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "npm"
- run: npm ci
- name: Build Tests
run: |
npm install -g @ionic/cli
npm run build
ionic cap sync
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Integration Tests
run: |
PORT=8100 npx react-scripts -r @cypress/instrument-cra start &
sleep 60
npm run test:e2e
env:
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
HAPPO_NONCE: ${{ github.run_id }}
- name: Upload Test Video
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-video
path: cypress/videos
- name: Upload Test Screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-screenshots
path: cypress/screenshots
- name: Component Tests
run: npm run test:component
env:
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
HAPPO_NONCE: ${{ github.run_id }}
- name: Upload to Happo
run: npx happo-e2e finalize
env:
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
HAPPO_NONCE: ${{ github.run_id }}
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
- name: Upload Test Data
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
backend:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nkalupahana/baseline')
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "npm"
- run: npm ci
- run: npm run build
internal:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nkalupahana/baseline')
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./scheduled-services
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "npm"
- run: npm ci
- run: npm run build
android:
needs: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "npm"
- run: npm ci
- name: Build (Ionic)
run: |
npm install -g @ionic/cli
npm run build
ionic cap sync
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
cache: gradle
- name: Build (Android)
run: |
cd android
chmod +x gradlew
./gradlew bundleDebug
- name: Send to DeployGate
env:
token: ${{ secrets.DEPLOYGATE_TOKEN }}
COMMIT_MSG: ${{ github.event.commits[0].message }}
run: curl -F "token=${token}" -F "file=@android/app/build/outputs/bundle/debug/app-debug.aab" -F "message=Upload from GitHub Actions, ref ${GITHUB_REF}, sha ${GITHUB_SHA}, msg ${COMMIT_MSG}" https://deploygate.com/api/users/nkalupahana/apps
- name: Build Release Artifact
if: github.ref == 'refs/heads/main'
run: |
echo $ANDROID_KEYSTORE | base64 --decode > android/app/release-ci.keystore
cd android
./gradlew bundleRelease
env:
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
- name: Send to Artifacts
uses: actions/upload-artifact@v4
with:
name: outputs
path: android/app/build/outputs
ios:
needs: frontend
runs-on: macos-14
concurrency:
group: "ios"
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "npm"
- run: npm ci
- name: Build (Ionic)
run: |
npm install -g @ionic/cli
npm run build
ionic cap sync
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Deploy to TestFlight
run: |
brew install fastlane
cd ios/App
echo "$APP_STORE_CONNECT_KEY" > authkey.json
fastlane beta
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
COMMIT_MSG: ${{ github.event.commits[0].message }}