github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/scripts/jest-snapshots/run-snapshots.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -euo pipefail
     4  
     5  
     6  updateArg=""
     7  
     8  if [ "$UPDATE_SNAPSHOTS" = true ]; then
     9    updateArg="-u"
    10  fi
    11  
    12  
    13  apt update -y
    14  apt install fontconfig -y
    15  
    16  if [ $(dpkg --print-architecture) = "arm64" ]; then
    17  # The chromium binary is not available for arm64.
    18    apt install chromium -y
    19  
    20    # To build canvas from source
    21    apt install python pkg-config -y
    22    apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
    23  fi
    24  
    25  # ignore-engines due to
    26  # warning webpack-plugin-serve@1.5.0: Invalid bin field for "webpack-plugin-serve".
    27  # error eslint-import-resolver-webpack@0.13.1: The engine "node" is incompatible with this module. Expected version "^16 || ^15 || ^14 || ^13 || ^12 || ^11 || ^10 || ^9 || ^8 || ^7 || ^6". Got "17.0.1"
    28  # error Found incompatible module.
    29  yarn install --ignore-engines --frozen-lockfile
    30  RUN_SNAPSHOTS=true yarn test --testNamePattern='group:snapshot' --verbose "$updateArg" --runInBand
    31