Skip to content

Merge pull request #116 from Frechetta/dev #260

Merge pull request #116 from Frechetta/dev

Merge pull request #116 from Frechetta/dev #260

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
permissions:
checks: write
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "dev", "main" ]
# pull_request:
# branches: [ "main" ]
# types: [opened, reopened, closed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install Lua and LuaRocks
run: |
git clone https://github.com/cogwheel/lua-wow.git
cd lua-wow
make linux
make test
sudo make install
sudo apt install luarocks
sudo luarocks install luacheck
sudo luarocks install busted
sudo luarocks install luacov
sudo luarocks install luacov-html
sudo luarocks install luacov-cobertura
- name: Static analysis
run: luacheck CalamityEPGP || true
- name: Unit test
run: scripts/test.sh -o junit > ut_results.xml
- name: Publish UT report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
with:
report_paths: ut_results.xml
- name: Publish coverage report
uses: 5monkeys/cobertura-action@v13
if: success() || failure()
with:
path: luacov.report.out
skip_covered: false
minimum_coverage: 0
release:
if: github.ref_name == 'main' # && github.event.pull_request.merged == true
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Release
id: release
env:
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
WOWINTERFACE_API_TOKEN: ${{ secrets.WOWINTERFACE_API_TOKEN }}
run: echo "version=$(scripts/release.sh)" >> $GITHUB_ENV
- name: Create tag
uses: anothrNick/github-tag-action@1.64.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{ env.version }}
WITH_V: false
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.version }}
artifacts: build/*.zip
bodyFile: build/changelog.md