Convert MongoDB from standalone to replica set #10924
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: frontend | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: | |
| - "Backend/**" | |
| - "Backend.Tests/**" | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }} | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| lint_build: | |
| runs-on: ubuntu-latest | |
| env: | |
| npm_config_ignore_scripts: true | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on | |
| # configuring harden-runner and identifying allowed endpoints. | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.github.com:443 | |
| github.com:443 | |
| objects.githubusercontent.com:443 | |
| registry.npmjs.org:443 | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Format-check frontend | |
| run: npm run fmt-frontend-check | |
| - name: Lint frontend | |
| run: npm run lint | |
| - name: Build frontend | |
| run: npm run build | |
| test_coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| npm_config_ignore_scripts: true | |
| strategy: | |
| matrix: | |
| node-version: [22] | |
| steps: | |
| # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on | |
| # configuring harden-runner and identifying allowed endpoints. | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.github.com:443 | |
| github.com:443 | |
| objects.githubusercontent.com:443 | |
| registry.npmjs.org:443 | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Run tests and generate coverage | |
| run: npm run test-frontend:coverage | |
| env: | |
| CI: true | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| if-no-files-found: error | |
| name: coverage | |
| path: coverage/cobertura-coverage.xml | |
| retention-days: 5 | |
| upload_coverage: | |
| needs: test_coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on | |
| # configuring harden-runner and identifying allowed endpoints. | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.github.com:443 | |
| cli.codecov.io:443 | |
| github.com:443 | |
| ingest.codecov.io:443 | |
| keybase.io:443 | |
| storage.googleapis.com:443 | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: coverage | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: cobertura-coverage.xml | |
| flags: frontend | |
| name: Frontend | |
| docker_build: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on | |
| # configuring harden-runner and identifying allowed endpoints. | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| auth.docker.io:443 | |
| files.pythonhosted.org:443 | |
| github.com:443 | |
| production.cloudflare.docker.com:443 | |
| pypi.org:443 | |
| registry-1.docker.io:443 | |
| registry.npmjs.org:443 | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build frontend | |
| run: | | |
| deploy/scripts/build.py --components frontend | |
| shell: bash | |
| - name: Image digest | |
| run: | | |
| docker image inspect combine_frontend:latest -f '{{json .Id}}' | |
| shell: bash |