From b354451c8332d7d2376b74f730a6001c58f68bb8 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 20 Aug 2020 14:45:38 +0200 Subject: [PATCH] improve github workflow, add build:packages --- .github/workflows/main.yml | 48 +++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55736509..51c41a7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,38 +8,25 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [14] steps: - - uses: actions/checkout@v2.3.2 - - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.1 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Restore yarn cache directory - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - run: yarn install + - uses: actions/checkout@v2.3.2 - name: Cypress run uses: cypress-io/github-action@v2 with: + group: Tests on Node v${{ matrix.node }} + cache-key: node-v${{ matrix.node }}-on-${{ runner.os }}-hash-${{ hashFiles('yarn.lock') }} + start: yarn start + wait-on: 'http://localhost:3000' browser: chrome - command: yarn run startandtest - name: Export screenshots (on failure only) uses: actions/upload-artifact@v1 @@ -55,5 +42,24 @@ jobs: name: cypress-videos path: tests/cypress/videos - - name: Build packages - run: yarn build:packages \ No newline at end of file + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14] + + steps: + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2.1.1 + with: + node-version: ${{ matrix.node-version }} + + - uses: actions/checkout@v2.3.2 + + - name: Install dependencies + run: yarn install + + - name: Build packages dependencies + run: yarn build:packages