build(deps): bump json from 2.16.0 to 2.18.0 #7612
Workflow file for this run
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: MarkUs Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test_rspec: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-22.04 | |
| services: | |
| postgres: | |
| image: postgres:14 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: markus_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --entrypoint redis-server | |
| env: | |
| BUNDLE_WITHOUT: development:production:console:unicorn | |
| RAILS_ENV: test | |
| RSPEC_RENDER_VIEWS: true | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install and cache system dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: | | |
| libpq-dev | |
| cmake | |
| ghostscript | |
| pandoc | |
| imagemagick | |
| libmagickwand-dev | |
| git | |
| libgl1 | |
| tesseract-ocr | |
| pandoc | |
| poppler-utils | |
| fonts-liberation | |
| libasound2 | |
| libatk-bridge2.0-0 | |
| libatk1.0-0 | |
| libatspi2.0-0 | |
| libcairo2 | |
| libcups2 | |
| libdbus-1-3 | |
| libdrm2 | |
| libegl1 | |
| libgbm1 | |
| libglib2.0-0 | |
| libgtk-3-0 | |
| libnspr4 | |
| libnss3 | |
| libpango-1.0-0 | |
| libx11-6 | |
| libx11-xcb1 | |
| libxcb1 | |
| libxcomposite1 | |
| libxdamage1 | |
| libxext6 | |
| libxfixes3 | |
| libxrandr2 | |
| libxshmfence1 | |
| version: 1.0 | |
| # Packages 'fonts-liberation' and onward are needed for playwright's chromium installation. | |
| # The list was taken from: https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/registry/nativeDeps.ts#L37-L63 | |
| - name: Set up ruby and cache gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby-3.3 | |
| bundler-cache: true | |
| - name: Set up node and cache packages | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| - name: Install npm packages | |
| run: npm ci | |
| - name: Install python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| run: | | |
| echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements-jupyter.txt') }}-${{ hashFiles('requirements-scanner.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Cache playwright's installation of Chromium | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('requirements-jupyter.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Install python packages and playwright dependencies | |
| run: | | |
| python3.10 -m venv venv | |
| ./venv/bin/pip install -r requirements-jupyter.txt -r requirements-scanner.txt | |
| ./venv/bin/playwright install chromium | |
| - name: Configure server | |
| run: | | |
| sudo rm -f /etc/localtime | |
| sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime | |
| sudo sed -ri 's/(rights=")none("\s+pattern="PDF")/\1read\2/' /etc/ImageMagick-6/policy.xml | |
| cp config/database.yml.ci config/database.yml | |
| - name: Build assets | |
| run: | | |
| bundle exec rake javascript:build | |
| bundle exec rake css:build | |
| - name: Set up database | |
| run: bundle exec rails db:migrate | |
| - name: Install chromedriver | |
| uses: nanasess/setup-chromedriver@v2 | |
| - name: Run chromedriver | |
| run: chromedriver --port=9515 --whitelisted-ips & | |
| - name: Run rspec tests | |
| run: bundle exec rspec | |
| env: | |
| MARKUS__PYTHON: ./venv/bin/python3 | |
| - name: Run rspec system tests | |
| run: bundle exec rspec spec/system | |
| env: | |
| MARKUS__PYTHON: ./venv/bin/python3 | |
| - name: Coveralls Parallel (rspec) | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: rspec | |
| parallel: true | |
| file: coverage/lcov.info | |
| test_jest: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-22.04 | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --entrypoint redis-server | |
| permissions: | |
| contents: read | |
| env: | |
| RAILS_ENV: test | |
| NODE_ENV: test | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up ruby and cache gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby-3.3 | |
| bundler-cache: true | |
| - name: Configure server | |
| run: | | |
| sudo rm -f /etc/localtime | |
| sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime | |
| sudo sed -ri 's/(rights=")none("\s+pattern="PDF")/\1read\2/' /etc/ImageMagick-6/policy.xml | |
| cp config/database.yml.ci config/database.yml | |
| - name: Export i18n translations | |
| run: bundle exec rake i18n:js:export | |
| - name: Build assets | |
| run: | | |
| bundle exec rake javascript:build | |
| - name: Set up node and cache packages | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| - name: Install npm packages | |
| run: npm ci | |
| - name: Run jest tests | |
| run: npm run test-cov | |
| - name: Coveralls Parallel (jest) | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: jest | |
| parallel: true | |
| file: coverage/lcov.info | |
| finish: | |
| needs: [test_rspec, test_jest] | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true | |
| carryforward: "rspec,jest" |