From d898f87115a1736971bc8811b0356f6b7163a5b8 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 26 May 2020 16:09:06 +0100 Subject: [PATCH] Added pull request ci --- .github/workflows/dev-deploy.yml | 8 ------- .github/workflows/luacheck.yml | 41 ++++++++++++++++++++++++++++++++ .gitmodules | 3 --- 3 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/luacheck.yml delete mode 100644 .gitmodules diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index ee815db9..fc0f9fa8 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -17,14 +17,6 @@ jobs: with: fetch-depth: 0 - - name: Checkout submodules - uses: textbook/git-checkout-submodule-action@master - with: - remote: true - - - name: Update .luacheckrc - run: cp ./Factorio-luacheckrc/.luacheckrc . - - name: Install Lua uses: leafo/gh-actions-lua@v5 diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 00000000..a0ecba7e --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,41 @@ +name: CI Luacheck + +on: pull_request + +jobs: + luacheck: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF#refs/heads/})" + id: extract_branch + + - name: Lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/explosivegaming/scenario/${{ steps.extract_branch.outputs.branch }}/.luacheckrc + + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install Lua + uses: leafo/gh-actions-lua@v5 + + - name: Install LuaRocks + uses: leafo/gh-actions-luarocks@v2 + + - name: Install LDoc + run: luarocks install ldoc 1.4.4-1 + + - name: Generate Documents + working-directory: docs + run: ldoc -i . \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 522fac32..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Factorio-luacheckrc"] - path = Factorio-luacheckrc - url = https://github.com/Nexela/Factorio-luacheckrc