diff --git a/.github/actions/setup-js/action.yml b/.github/actions/setup-js/action.yml index 31159165..c3140d72 100644 --- a/.github/actions/setup-js/action.yml +++ b/.github/actions/setup-js/action.yml @@ -3,17 +3,22 @@ name: Setup JavaScript envirionment runs: using: "composite" steps: - - name: Install Node - uses: actions/setup-node@v1 - with: - node-version: 18.x - - name: Install emsdk uses: ./.github/actions/install-emsdk - name: Install Ninja uses: ./.github/actions/install-ninja + - name: Setup Node environment + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: yarn + cache-dependency-path: yarn.lock + env: + # https://github.com/actions/setup-node/issues/317 + FORCE_COLOR: 0 + - name: yarn install shell: bash run: yarn install --frozen-lockfile diff --git a/.github/actions/setup-website/action.yml b/.github/actions/setup-website/action.yml index 0473cee3..b255d06b 100644 --- a/.github/actions/setup-website/action.yml +++ b/.github/actions/setup-website/action.yml @@ -5,14 +5,19 @@ runs: steps: # TODO: Update to latest when website is moved to the workspace version of # yoga-layout - - name: Install Node - uses: actions/setup-node@v1 + - name: Setup Node environment + uses: actions/setup-node@v3 with: node-version: 12.x + cache: yarn + cache-dependency-path: website/yarn.lock + env: + # https://github.com/actions/setup-node/issues/317 + FORCE_COLOR: 0 # TODO: the website should be in a yarn workspace with the library, but the # current version of gatsby is incompatible with hoisting. - name: yarn install shell: bash - run: yarn install --frozen-lockfile + run: yarn install --frozen-lockfile --network-timeout 1000000 working-directory: website diff --git a/.github/workflows/validate-js.yml b/.github/workflows/validate-js.yml index d3ee8392..fa26dbca 100644 --- a/.github/workflows/validate-js.yml +++ b/.github/workflows/validate-js.yml @@ -65,8 +65,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: yarn install - run: yarn install --frozen-lockfile + - name: Setup + uses: ./.github/actions/setup-js - name: yarn lint run: yarn lint @@ -77,9 +77,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: yarn install - run: yarn install --frozen-lockfile - working-directory: javascript + - name: Setup + uses: ./.github/actions/setup-js - name: yarn tsc run: yarn tsc