From 17d324501c128d8789fef5f41b530854fa025fb9 Mon Sep 17 00:00:00 2001 From: Asa <26807394+a01sa01to@users.noreply.github.com> Date: Wed, 24 Apr 2024 22:38:35 +0900 Subject: [PATCH] ci: cache --- .github/workflows/rime.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rime.yml b/.github/workflows/rime.yml index f679826..00111cb 100644 --- a/.github/workflows/rime.yml +++ b/.github/workflows/rime.yml @@ -16,20 +16,26 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt + - name: Enumerate Problems + id: problems + run: | + problems=$(ls -d */ | grep -v _common | tr -d '/') + echo "Problems: $problems" + echo "problems=$problems" >> $GITHUB_OUTPUT + - name: Cache Rime + uses: actions/cache@v4 + with: + path: ./*/rime-out/** + key: rime - name: Run Tests run: | - directories=$(ls -d */) - for directory in $directories; do - dirname=$(basename $directory) - if [[ $dirname == "_common" ]]; then - continue - fi - echo ::group::$dirname - rime test $dirname + for prob in ${{ steps.problems.outputs.problems }}; do + echo ::group::$prob + rime test $prob echo ::endgroup:: done