Bump mail from 2.8.1 to 2.9.1 in /packages/rails #39
This file contains hidden or 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: precisionFDA | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| static-analysis-master: | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| name: Static Analysis for Master | |
| runs-on: ubuntu-latest | |
| env: | |
| MAKE: "make --jobs 4" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| working-directory: ./packages/rails | |
| bundler-cache: true | |
| cache-version: 1 | |
| # # Enable this after a global rubocop fix. | |
| # - name: Rubocop | |
| # run: bundle exec rubocop | |
| - name: Brakeman | |
| working-directory: ./packages/rails | |
| run: bundle exec brakeman -A -w2 --parser-timeout 30 | |
| ruby-static-analysis-pr: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| name: Ruby Static Analysis for PR | |
| runs-on: ubuntu-latest | |
| env: | |
| MAKE: "make --jobs 4" | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| statuses: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch Git branches | |
| run: git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/* | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| working-directory: ./packages/rails | |
| bundler-cache: true | |
| cache-version: 1 | |
| - name: Rubocop | |
| working-directory: ./packages/rails | |
| run: bundle exec pronto run -f github_status github_pr -c origin/${{ github.base_ref }} | |
| env: | |
| PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }} | |
| PRONTO_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BUNDLE_PATH: "vendor/bundle" | |
| - name: Brakeman | |
| working-directory: ./packages/rails | |
| run: bundle exec pronto run -f github_status github_pr -c origin/${{ github.base_ref }} -r brakeman | |
| env: | |
| PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }} | |
| PRONTO_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BUNDLE_PATH: "vendor/bundle" | |
| node-static-analysis-pr: | |
| name: Node Static Analysis for PR | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| statuses: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Ensure package.json versions do not use caret | |
| run: node packages/scripts/check-no-caret-versions.mjs | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| version: 11.1.1 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24.15.0 | |
| cache: "pnpm" | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install modules | |
| run: pnpm install --frozen-lockfile | |
| - name: Get changed files (server) | |
| id: changed-server | |
| uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1 | |
| with: | |
| files: | | |
| packages/server/apps/**/*.ts | |
| packages/server/libs/**/*.ts | |
| - name: Run Biome CI on changed files (server) | |
| if: steps.changed-server.outputs.any_changed == 'true' | |
| working-directory: packages/server | |
| shell: bash | |
| run: | | |
| FILES_TO_CHECK=(${FILES//packages\/server\//}) | |
| pnpm exec biome ci "${FILES_TO_CHECK[@]}" | |
| env: | |
| FILES: ${{ steps.changed-server.outputs.all_changed_files }} | |
| - name: Get changed files (client) | |
| if: ${{ !cancelled() }} | |
| id: changed-client | |
| uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1 | |
| with: | |
| files: | | |
| packages/client/src/**/*.ts | |
| packages/client/src/**/*.tsx | |
| - name: Run Biome CI on changed files (client) | |
| if: ${{ !cancelled() && steps.changed-client.outputs.any_changed == 'true' }} | |
| working-directory: packages/client | |
| shell: bash | |
| run: | | |
| FILES_TO_CHECK=(${FILES//packages\/client\//}) | |
| pnpm exec biome ci "${FILES_TO_CHECK[@]}" | |
| env: | |
| FILES: ${{ steps.changed-client.outputs.all_changed_files }} | |
| test-ruby: | |
| name: Test Ruby | |
| runs-on: ubuntu-latest | |
| env: | |
| MAKE: "make --jobs 4" | |
| services: | |
| mysql: | |
| image: mysql:8.4.9 | |
| ports: | |
| - 3306:3306 | |
| env: | |
| MYSQL_ROOT_PASSWORD: password | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| working-directory: ./packages/rails | |
| bundler-cache: true | |
| cache-version: 1 | |
| - name: Install & Build | |
| working-directory: ./packages/rails | |
| env: | |
| NO_FIPS: 1 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y nodejs | |
| npm install -g bower | |
| bower install --allow-root | |
| cp config/database.ci.yml config/database.yml | |
| bundle exec rake db:setup | |
| mkdir -p public/packs | |
| touch public/packs/bundle.js | |
| touch public/packs/bundle.css | |
| - name: Test | |
| working-directory: ./packages/rails | |
| env: | |
| NO_FIPS: 1 | |
| RAILS_LOG_TO_STDOUT: 1 | |
| LOG_REQUESTS: 1 | |
| run: bundle exec rspec | |
| test-node-backend: | |
| name: Test Node Backend | |
| runs-on: ubuntu-latest | |
| env: | |
| NODE_ENV: ci_test | |
| DATABASE_TEST_URL: mysql://root:password@127.0.0.1:3306/test_db | |
| DATABASE_TEST_NAME: test_db | |
| SECRET_KEY_BASE: secret | |
| JOB_TOKEN_ENCRYPTION_KEY: supersecret | |
| MAKE: "make --jobs 4" | |
| services: | |
| mysql: | |
| image: mysql:8.4.9 | |
| ports: | |
| - 3306:3306 | |
| env: | |
| MYSQL_ROOT_PASSWORD: password | |
| # Datadir in RAM - the job is fsync-heavy on commits and was hostage to | |
| # runner disk speed. Health check gates on mysqld accepting TCP (it is | |
| # socket-only during image init); no credentials because `mysqladmin | |
| # ping` exits 0 even on Access denied. | |
| options: >- | |
| --tmpfs /var/lib/mysql:rw,size=2g | |
| --health-cmd="mysqladmin ping -h 127.0.0.1 --silent" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=30 | |
| redis: | |
| image: redis:8.6.3 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 | |
| with: | |
| working-directory: ./packages/rails | |
| bundler-cache: true | |
| cache-version: 1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| version: 11.1.1 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24.15.0 | |
| cache: "pnpm" | |
| cache-dependency-path: packages/server/pnpm-lock.yaml | |
| - name: Verify pnpm | |
| run: pnpm -v | |
| - name: Prepare env & DB | |
| working-directory: ./packages/rails | |
| env: | |
| NO_FIPS: 1 | |
| run: | | |
| cp config/database.ci.yml config/database.yml | |
| bundle exec rake db:setup | |
| bundle exec rake db:generate_mock_data | |
| bundle exec rake user:generate_test_users | |
| - name: Install Dependencies (Server Only) | |
| working-directory: ./packages/server | |
| run: pnpm install --frozen-lockfile --filter ./packages/server... --prod=false --filter . | |
| - name: Run Tests | |
| working-directory: ./packages/server | |
| run: | | |
| make test-shared | |
| make test-worker | |
| make test-api | |
| make test-admin-platform-client | |
| - name: Test Production Build | |
| working-directory: ./packages/server | |
| run: pnpm run build | |
| - name: Test API Production Start | |
| working-directory: ./packages/server | |
| run: make run-dist ARGS="-- --shutdown" | |
| timeout-minutes: 1 | |
| - name: Test Worker Production Start | |
| working-directory: ./packages/server | |
| run: make run-dist ARGS="-- --shutdown" | |
| timeout-minutes: 1 | |
| test-react-app: | |
| name: Test React app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| version: 11.1.1 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: "24.15.0" | |
| cache: "pnpm" | |
| cache-dependency-path: packages/client/pnpm-lock.yaml | |
| - name: Install dependencies | |
| working-directory: ./packages/client | |
| run: pnpm install --frozen-lockfile --prod=false | |
| - name: Install Playwright browsers | |
| working-directory: ./packages/client | |
| run: pnpm exec playwright install chromium --with-deps | |
| - name: Test | |
| working-directory: ./packages/client | |
| run: pnpm test:run | |
| test-react-app-production: | |
| name: Test React app production build | |
| runs-on: ubuntu-latest | |
| env: | |
| NODE_ENV: production | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| version: 11.1.1 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: "24.15.0" | |
| - name: Install dependencies | |
| working-directory: ./packages/client | |
| run: pnpm install --frozen-lockfile --prod=false | |
| - name: Build production | |
| working-directory: ./packages/client | |
| run: pnpm run build |