test #42
This file contains 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: "Test" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
kongVersion: | |
- "2.3.x" | |
- "2.8.x" | |
- "3.0.x" | |
- "dev" | |
- "3.0.0.x" | |
- "dev-ee" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone kong-pongo | |
run: git clone https://github.com/nawaz1991/kong-pongo.git | |
- name: Setup env | |
run: | | |
PATH=$PATH:~/.local/bin | |
mkdir -p ~/.local/bin | |
ln -s $(realpath kong-pongo/pongo.sh) ~/.local/bin/pongo | |
# - run: pongo run -- --coverage | |
- run: pongo run # code coverage flag is added to https://github.com/nawaz1991/kong-pongo/blob/master/pongo.sh#L1161 | |
# Optional upload of coverage data, | |
# just ugly, something to fix... | |
- uses: leafo/gh-actions-lua@v10 | |
if: success() | |
- uses: leafo/gh-actions-luarocks@v4 | |
if: success() | |
- name: Report test coverage | |
if: success() | |
continue-on-error: true | |
run: | | |
luarocks install luacov-coveralls | |
pwd | |
ls -la | |
luacov-coveralls | |
#luacov-coveralls --output coveralls.out | |
# undo the hack | |
if [ -f .luacov_backup ]; then | |
mv .luacov_backup .luacov | |
fi | |
env: | |
COVERALLS_REPO_TOKEN: ${{ github.token }} |