Skip to content

Commit

Permalink
add cache for github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwbsn committed Sep 13, 2022
1 parent ff6ecbd commit 4f2e32e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
with:
python-version: 3.8
architecture: x64
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run nusantara tests
Expand All @@ -24,7 +25,11 @@ jobs:
DATASET_NAME: ${{ github.event.client_payload.slash_command.args.named.dataset }}
SUBSET_ID: ${{ github.event.client_payload.slash_command.args.named.subset_id }}
run: |
output=$(python -m tests.test_nusantara nusantara/nusa_datasets/${{ env.DATASET_NAME }}/${{ env.DATASET_NAME }}.py --subset_id=${{ env.SUBSET_ID }})
if [ "$SUBSET_ID" == "" ]; then
output=$(python -m tests.test_nusantara nusantara/nusa_datasets/${{ env.DATASET_NAME }}/${{ env.DATASET_NAME }}.py)
else
output=$(python -m tests.test_nusantara nusantara/nusa_datasets/${{ env.DATASET_NAME }}/${{ env.DATASET_NAME }}.py --subset_id=${{ env.SUBSET_ID }})
fi
echo "::set-output name=run_url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
- name: Add comment result
uses: peter-evans/create-or-update-comment@v2
Expand Down

0 comments on commit 4f2e32e

Please sign in to comment.