From 518a8fd33017baa3441c5c31619e71842302ef7a Mon Sep 17 00:00:00 2001 From: Chris Joel Date: Wed, 11 Mar 2020 11:02:28 -0700 Subject: [PATCH] Run fidelity tests in Github Actions --- .github/workflows/fidelity-tests.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/fidelity-tests.yml diff --git a/.github/workflows/fidelity-tests.yml b/.github/workflows/fidelity-tests.yml new file mode 100644 index 0000000000..68f651f640 --- /dev/null +++ b/.github/workflows/fidelity-tests.yml @@ -0,0 +1,45 @@ +name: Fidelity tests + +on: [pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - name: Get npm cache directory + id: npm-cache + run: | + echo "::set-output name=dir::$(npm config get cache)" + + - name: Cache npm packages + uses: actions/cache@v1 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- + + - name: NPM install + run: npm ci + + - name: Lint TypeScript sources + run: npm run lint + + - name: Bootstrap packages + run: npm run bootstrap + + - name: Build packages + run: npm run build + + - name: Fidelity tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: | + cd ./packages/render-fidelity-tools + npm run test \ No newline at end of file