Skip to content

adjust stub for micro-blog #77

adjust stub for micro-blog

adjust stub for micro-blog #77

Workflow file for this run

name: PR
on:
pull_request:
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: leafo/gh-actions-lua@8c9e175e7a3d77e21f809eefbee34a19b858641b
with:
luaVersion: 5.4
- uses: leafo/gh-actions-luarocks@97053c556d6ce2c8e26eb7ac93743437c7af7248
- name: build
run: |
luarocks install busted
luarocks install moonscript
- 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