chore: emotionless #5478
Workflow file for this run
This file contains 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: Integration tests | |
on: [pull_request] | |
env: | |
CI: true | |
WALLET_ENVIRONMENT: testing | |
jobs: | |
directories: | |
runs-on: ubuntu-latest | |
outputs: | |
dir: ${{ steps.set-dirs.outputs.TEST_DIRECTORIES }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: set-dirs | |
working-directory: ./tests-legacy/integration | |
run: echo "TEST_DIRECTORIES=$( ls -d */ | xargs -0 | sed 's/\///' | jq -R -s -c 'split("\n")[:-2]')" >> $GITHUB_OUTPUT | |
test-integration: | |
runs-on: ubuntu-latest | |
needs: [directories] | |
strategy: | |
fail-fast: false | |
matrix: | |
dir: ${{ fromJson(needs.directories.outputs.dir) }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/provision | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
env: | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
run: yarn --frozen-lockfile | |
- name: Cache playwright binaries | |
uses: actions/cache@v3 | |
id: playwright-cache | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-cache-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install Playwright browsers | |
run: yarn playwright install chrome chromium | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- name: Install Playwright deps | |
run: yarn playwright install-deps | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- name: Build assets | |
run: yarn build:test | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Run tests | |
run: | | |
xvfb-run --auto-servernum -- \ | |
yarn jest \ | |
--config="./jest.integration.config.js" \ | |
--detectOpenHandles \ | |
--forceExit \ | |
--testPathPattern=./tests-legacy/integration/${{ matrix.dir }}/* | |
- name: Upload traces | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: traces-${{ matrix.dir }}-${{ steps.date.outputs.date }} | |
path: '**/**.trace.zip' |