-
-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (32 loc) · 1.09 KB
/
pr.yml
File metadata and controls
39 lines (32 loc) · 1.09 KB
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
name: PR
on:
pull_request:
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: leafo/gh-actions-lua@6919171ccf181b826f44b9bca76307b577217377
with:
luaVersion: "5.5.0"
- uses: leafo/gh-actions-luarocks@35d062def313a7699a0d513e996bcf4352f05389
with:
luarocksVersion: "3.13.0"
- name: build
run: |
luarocks install busted
luarocks install moonscript
luarocks install lua-tz
- name: Run tests for changed/added exercises
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pr_endpoint=$(jq -r '"repos/\(.repository.full_name)/pulls/\(.pull_request.number)"' "$GITHUB_EVENT_PATH")
gh api "$pr_endpoint/files" --paginate --jq '
map(
.filename
| select(match("\\.moon$"))
| match("exercises/practice/([^/]+)/")
| .captures[0].string
) | unique[]
' | xargs -r -L1 bin/verify-exercises