-
Notifications
You must be signed in to change notification settings - Fork 15
added GitHub CI and other minor edits eyeing Lua 5.5 #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: master | ||
| pull_request: | ||
| branches: '*' | ||
|
|
||
| jobs: | ||
| ci: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| luaVersion: ["5.1", "5.2", "5.3", "5.4", "5.5", "luajit", "luajit-openresty"] | ||
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@master | ||
|
|
||
| - uses: ilammy/msvc-dev-cmd@v1 | ||
| if: ${{ runner.os == 'Windows' && !startsWith(matrix.luaVersion, 'luajit') }} | ||
|
|
||
| - uses: luarocks/gh-actions-lua@master | ||
| with: | ||
| luaVersion: ${{ matrix.luaVersion }} | ||
|
|
||
| - uses: luarocks/gh-actions-luarocks@master | ||
|
|
||
| - name: Lint development rockspec | ||
| run: luarocks lint "argparse-scm-2.rockspec" | ||
|
|
||
| - name: Install busted | ||
| run: luarocks install busted | ||
|
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Busted supports GitHub Actions: https://github.com/lunarmodules/busted?tab=readme-ov-file#use-as-a-ci-job |
||
|
|
||
| - name: Install cluacov | ||
| run: luarocks install cluacov | ||
|
|
||
| - name: Install luacheck | ||
| run: luarocks install luacheck | ||
|
|
||
| - name: Run luacheck | ||
| run: luacheck src spec | ||
|
Comment on lines
+39
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Luacheck supports GitHub Actions: https://github.com/lunarmodules/luacheck?tab=readme-ov-file#use-as-a-ci-job |
||
|
|
||
| - name: Run tests | ||
| run: busted -c | ||
|
|
||
| - name: Run code coverage | ||
| run: luacov | ||
|
|
||
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general good practice / security measure, I think
@mastershould never be used, and we should have pined version (using sha rather than tags)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you on that matter. However, if you inspect other projects led by Hisham, you can see that he employs actions from the default branch most of the times.
LuaRocks:
Teal: https://github.com/teal-language/tl/blob/72a3182ff20f27601ba4ac0ca281dbc1ddbcbb1b/.github/workflows/ci.yml#L23-L30
cluacov: https://github.com/luarocks/cluacov/blob/e81e0f9edac19790ca8d057e9fcf7ddf7d1a6fcc/.github/workflows/test.yml#L18-L29
So, I'm following his patterns on his repositories. If he (or any repo admin) requests it to be changed to a pinned commit SHA strategy, for sure I'll do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification!