Skip to content

Merge branch 'master' into aburkut/back-1332-tests-ci #1796

Merge branch 'master' into aburkut/back-1332-tests-ci

Merge branch 'master' into aburkut/back-1332-tests-ci #1796

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7
with:
node-version: 16
- name: Install Dependencies
run: yarn
- name: Run Eslint checks
if: github.event_name == 'push'
run: yarn check:es
- name: Run Changed tests only
if: github.event_name == 'pull_request'
timeout-minutes: 15
env:
TENDERLY_ACCOUNT_ID: ${{ secrets.TENDERLY_USERNAME }}
TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
TENDERLY_TOKEN: ${{ secrets.TENDERLY_TOKEN }}
HTTP_PROVIDER_1: ${{ secrets.HTTP_PROVIDER_1 }}
HTTP_PROVIDER_10: ${{ secrets.HTTP_PROVIDER_10 }}
HTTP_PROVIDER_56: ${{ secrets.HTTP_PROVIDER_56 }}
HTTP_PROVIDER_137: ${{ secrets.HTTP_PROVIDER_137 }}
HTTP_PROVIDER_250: ${{ secrets.HTTP_PROVIDER_250 }}
HTTP_PROVIDER_1101: ${{ secrets.HTTP_PROVIDER_1101 }}
HTTP_PROVIDER_8453: ${{ secrets.HTTP_PROVIDER_8453 }}
HTTP_PROVIDER_42161: ${{ secrets.HTTP_PROVIDER_42161 }}
HTTP_PROVIDER_43114: ${{ secrets.HTTP_PROVIDER_43114 }}
run: |
CHANGED_TESTS=$(git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }} | grep test.ts || true)
echo "$CHANGED_TESTS"
if [ -n "$CHANGED_TESTS" ]; then
echo "Running the following changed specs"
npx jest --ci --forceExit --verbose $CHANGED_TESTS
else
echo "There are no changed tests...skipping"
fi
printf '%s\n' "$TENDERLY_PROJECT" > test.txt
cat test.txt