From 24d24cf84efd3da3d42b0f94c0de8a64f0e31806 Mon Sep 17 00:00:00 2001 From: c-bata Date: Sun, 11 Apr 2021 18:39:53 +0900 Subject: [PATCH] Run integration tests on GitHub Actions --- .github/workflows/integration-tests.yml | 51 +++++++++++++++++++++++++ .github/workflows/typescript-checks.yml | 3 ++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/integration-tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 00000000..b1a3e0a2 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,51 @@ +name: integration-tests +on: + pull_request: + branches: + - main + paths: + - '.github/workflows/integration-tests.yml' + - '**.py' + - '**.ts' + - '**.tsx' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Node v14 + uses: actions/setup-node@v2-beta + with: + node-version: '14' + - run: npm install + - run: npm run build:dev + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + architecture: x64 + - name: Install dependencies + run: | + python -m pip install --progress-bar off --upgrade pip setuptools + pip install --progress-bar off . + pip install --progress-bar off pyppeteer + + - name: Cache headless chromium + id: cache-chromium + uses: actions/cache@v2 + with: + path: ./local-chromium + key: chromium + - run: pyppeteer-install + if: steps.cache-chromium.outputs.cache-hit != 'true' + env: + PYPPETEER_HOME: ./local-chromium + + - run: python visual_regression_test.py + env: + PYPPETEER_HOME: ./local-chromium --no-screenshot --sleep 3 diff --git a/.github/workflows/typescript-checks.yml b/.github/workflows/typescript-checks.yml index c2317dae..525e1d6b 100644 --- a/.github/workflows/typescript-checks.yml +++ b/.github/workflows/typescript-checks.yml @@ -6,6 +6,9 @@ on: - '.eslintrc.js' - '**.ts' - '**.tsx' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' jobs: lint: name: Lint checking on Ubuntu