Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
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

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 @master should never be used, and we should have pined version (using sha rather than tags)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!


- 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- 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 }}
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# argparse

[![Build Status](https://travis-ci.org/luarocks/argparse.png?branch=master)](https://travis-ci.org/luarocks/argparse)
[![CI](https://github.com/luarocks/argparse/actions/workflows/ci.yml/badge.svg)](./.github/workflows/ci.yml)
[![Coverage status](https://codecov.io/gh/luarocks/argparse/branch/master/graph/badge.svg)](https://codecov.io/gh/luarocks/argparse)

Argparse is a feature-rich command line parser for Lua inspired by argparse for Python.
Expand Down Expand Up @@ -104,7 +104,7 @@ Did you mean '--output'?

### Using LuaRocks

Installing argparse using [LuaRocks](http://luarocks.org) is simple:
Installing argparse using [LuaRocks](https://luarocks.org) is simple:

```bash
$ luarocks install argparse
Expand All @@ -122,7 +122,7 @@ Tutorial HTML files can be built using [Sphinx](http://sphinx-doc.org/): `sphinx

## Testing

argparse comes with a testing suite located in `spec` directory. [busted](http://olivinelabs.com/busted/) is required for testing, it can be installed using LuaRocks. Run the tests using `busted` command from the argparse folder.
argparse comes with a testing suite located in `spec` directory. [busted](https://github.com/lunarmodules/busted) is required for testing, it can be installed using LuaRocks. Run the tests using `busted` command from the argparse folder.

## License

Expand Down