From bf28104dfb77db49500ee9f8601d1399e3bc146a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 30 Jun 2021 11:53:02 +0200 Subject: [PATCH] Cache yarn packages in tests that build client --- .github/workflows/first_startup.yaml | 3 +++ .github/workflows/integration_selenium.yaml | 3 +++ .github/workflows/jest.yaml | 5 ++++- .github/workflows/selenium.yaml | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index 9f7d495be8a..bd1f8ff29a6 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -30,6 +30,9 @@ jobs: with: path: ~/.cache/pip key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'galaxy root/client/yarn.lock' - name: Install tox run: pip install tox # Use this job to test the latest migrations diff --git a/.github/workflows/integration_selenium.yaml b/.github/workflows/integration_selenium.yaml index 4d0e3b1d706..6403c7013d8 100644 --- a/.github/workflows/integration_selenium.yaml +++ b/.github/workflows/integration_selenium.yaml @@ -41,6 +41,9 @@ jobs: with: path: ~/.cache/pip key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'galaxy root/client/yarn.lock' - name: Run tests run: './run_tests.sh -integration test/integration_selenium' working-directory: 'galaxy root' diff --git a/.github/workflows/jest.yaml b/.github/workflows/jest.yaml index 5ce1d9ebff4..6a53caeeda1 100644 --- a/.github/workflows/jest.yaml +++ b/.github/workflows/jest.yaml @@ -12,7 +12,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node}} + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'client/yarn.lock' - run: yarn install working-directory: client - run: yarn jest - working-directory: client \ No newline at end of file + working-directory: client diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml index 27464bf9d50..20860ec3088 100644 --- a/.github/workflows/selenium.yaml +++ b/.github/workflows/selenium.yaml @@ -34,6 +34,9 @@ jobs: with: path: ~/.cache/pip key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - uses: mvdbeek/gha-yarn-cache@master + with: + yarn-lock-file: 'galaxy root/client/yarn.lock' - uses: nanasess/setup-chromedriver@master - name: Run tests run: ./run_tests.sh -selenium lib/galaxy_test/selenium -- --num-shards=3 --shard-id=${{ matrix.chunk }}