add ci check? #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 | |
| with: | |
| persist-credentials: false | |
| - name: set up nushell | |
| uses: hustcer/setup-nu@920172d92eb04671776f3ba69d605d3b09351c30 # v3.22 | |
| with: | |
| version: "0.109" | |
| - shell: nu {0} | |
| run: | | |
| ls **/*.nu | |
| | par-each { |it| | |
| nu --ide-check 100 $it.name | |
| | from json --objects | |
| | where type != hint | |
| | if ($in | is-not-empty) { | |
| print $"Errors in ($it.name):"; | |
| print $in; | |
| print "\n"; | |
| exit 1; | |
| } | |
| } |