diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 6b19bb596e6e..89f0c5cae36b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -15,19 +15,43 @@ jobs: strategy: matrix: - node-version: [8.x, 10.x, 12.x] + node-version: [12.x, 13.x, 14.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm install - npm run bootstrap - npm run build - npm test + # - name: restore lerna + # uses: actions/cache@v2 + # with: + # path: | + # node_modules + # */*/node_modules + # key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - 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- + - run: npm install -g yarn + - run: yarn config set registry https://registry.yarnpkg.com + - name: install + run: yarn + - name: bootstrap + run: yarn run bootstrap:lerna + - name: lint + run: yarn run lint + - name: build + run: yarn run build:parallel + - name: test + run: yarn test env: CI: true