# This script will run tests anytime a pull request is added name: Session Test on: pull_request: branches: - development - clearnet - github-actions - react-refactor jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [windows-2016, macos-latest, ubuntu-18.04] env: SIGNAL_ENV: production GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - run: git config --global core.autocrlf false - name: Checkout git repo uses: actions/checkout@v2 - name: Pull git submodules run: git submodule update --init # file server dependencies are not needed for now # - name: Install file server dependency # run: | # cd session-file-server # yarn install; # cd - - name: Install node uses: actions/setup-node@v1 with: node-version: 10.13.0 - name: Setup node for windows if: runner.os == 'Windows' run: | npm install --global --production windows-build-tools@4.0.0 npm install --global node-gyp@latest npm config set python python2.7 npm config set msvs_version 2015 - uses: actions/cache@v2 id: yarn-cache with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Install Dependencies #skipped if step before set variable to true if: | steps.yarn-cache.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile --network-timeout 600000 - name: Generate and concat files run: yarn generate - name: Lint Files if: runner.os != 'Windows' run: | yarn format-full yarn eslint yarn tslint - name: Make linux use en_US locale if: runner.os == 'Linux' run: | sudo apt-get install -y hunspell-en-us sudo locale-gen en_US.UTF-8 sudo dpkg-reconfigure locales echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`" echo ::set-env name=DISPLAY:::9.0 echo ::set-env name=LANG::en_US.UTF-8 echo "::`echo -n ${{ github.token }} | sha256sum | head -c 64`::" - name: Test uses: GabrielBB/xvfb-action@v1.0 with: run: yarn test