-
Notifications
You must be signed in to change notification settings - Fork 62
42 lines (42 loc) · 1.54 KB
/
run-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test Dataloader
on:
repository_dispatch:
types: [test-command]
jobs:
run_test:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10
architecture: x64
cache: 'pip'
- name: Install dependencies
run: |
sudo apt-get install libsndfile1
pip install -r requirements.txt
- name: Run nusantara tests
id: nusantara_test
continue-on-error: true
env:
DATASET_NAME: ${{ github.event.client_payload.slash_command.args.named.dataset }}
SUBSET_ID: ${{ github.event.client_payload.slash_command.args.named.subset_id }}
run: |
if [ "$SUBSET_ID" == "" ]; then
output=$(python -m tests.test_nusantara nusacrowd/nusa_datasets/${{ env.DATASET_NAME }}/${{ env.DATASET_NAME }}.py)
else
output=$(python -m tests.test_nusantara nusacrowd/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
with:
issue-number: ${{ github.event.client_payload.pull_request.number }}
body: |
### Run result
Check test log here: ${{ steps.nusantara_test.outputs.run_url}}