Skip to content

Merge pull request #17 from 1337joe/renovate/codecov-codecov-action-4.x #127

Merge pull request #17 from 1337joe/renovate/codecov-codecov-action-4.x

Merge pull request #17 from 1337joe/renovate/codecov-codecov-action-4.x #127

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
luarocks:
name: Test LuaRocks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # v4.3.0
- name: Setup
run: |
luarocks install --only-deps du-bundler-scm-0.rockspec
- name: Verify LuaRocks config
run: luarocks make
test:
name: Run Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# luaVersion: [ "5.3" ]
luaVersion: [ "5.1", "5.2", "5.3", "5.4" ]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@e65774a6386cb4f24e293dca7fc4ff89165b64c5 # tag=v4.3.0
- name: Setup
run: |
luarocks install --only-deps du-bundler-scm-0.rockspec
luarocks install luaunit
luarocks install luacov
luarocks install luafilesystem
mkdir test/results
- name: Test
run: lua -lluacov ./test/TestBundleTemplate.lua -o junit -n test/results/TestBundleTemplate.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2.17.1
if: always()
with:
junit_files: "test/results/**/*.xml"
- name: Upload to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
if: ${{ matrix.luaVersion == '5.3' }}