diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 79dc41ef3..6951e8970 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,13 @@ jobs: - '14' steps: - uses: actions/checkout@v2 + - name: Set up system + run: bin/before_install - name: Set up Node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - cache: yarn + cache: ${{ !env.ACT && 'yarn' || '' }} registry-url: https://npm.manageiq.org/ - name: Prepare tests run: bin/setup diff --git a/bin/before_install b/bin/before_install new file mode 100755 index 000000000..aac98da9d --- /dev/null +++ b/bin/before_install @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -n "$ACT" ]; then + # Install yarn + curl -o- -L https://yarnpkg.com/install.sh | bash + echo "$HOME/.yarn/bin" >> $GITHUB_PATH + echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH +fi