From 28e79fe4e5c1e742d05fd3a0e31764532871727b Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Mon, 17 Jan 2022 07:54:29 -0800 Subject: [PATCH] Run js-flipper tests on GH (#3298) Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/3298 Reviewed By: passy Differential Revision: D33620152 fbshipit-source-id: 3ed14dd8a4813f9e3e8b62774d6969c52348e6d1 --- .github/workflows/js.yml | 44 ++++++++++++++++++++++++++++++++++++ js/js-flipper/jest.config.js | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/js.yml diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml new file mode 100644 index 000000000..63e00ce47 --- /dev/null +++ b/.github/workflows/js.yml @@ -0,0 +1,44 @@ +name: js-flipper + +on: [push, pull_request] + +jobs: + test-js-flipper: + defaults: + run: + working-directory: js/js-flipper + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + - name: yarn install (with retry) + uses: nick-invision/retry@v2.6.0 + with: + command: cd js/js-flipper && yarn + timeout_minutes: 30 + max_attempts: 3 + - name: lint + run: yarn lint + - name: test + run: yarn test --coverage + + build-react-example: + defaults: + run: + working-directory: js/react-flipper-example + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '14.x' + - name: yarn install (with retry) + uses: nick-invision/retry@v2.6.0 + with: + command: cd js/react-flipper-example && yarn + timeout_minutes: 30 + max_attempts: 3 + - name: build + run: yarn build diff --git a/js/js-flipper/jest.config.js b/js/js-flipper/jest.config.js index 0ec7a4873..b9463d2b8 100644 --- a/js/js-flipper/jest.config.js +++ b/js/js-flipper/jest.config.js @@ -10,6 +10,6 @@ module.exports = { preset: 'ts-jest', clearMocks: true, - coverageReporters: ['json-summary', 'lcov', 'html'], + coverageReporters: ['json-summary', 'lcov', 'html', 'text-summary'], testMatch: ['**/**.spec.(js|jsx|ts|tsx)'], };