diff options
author | Caleb Maclennan <caleb@alerque.com> | 2023-12-22 00:44:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-22 00:44:00 +0300 |
commit | f4e92f6291617cd989126510a7dc653e8cf28799 (patch) | |
tree | 35b896aa4766dd3fc5b1d147744b92b85178dab8 | |
parent | c06963917ccc951a1058d7b7f412c52d3c4f443a (diff) | |
download | luasystem-f4e92f6291617cd989126510a7dc653e8cf28799.tar.gz luasystem-f4e92f6291617cd989126510a7dc653e8cf28799.tar.bz2 luasystem-f4e92f6291617cd989126510a7dc653e8cf28799.zip |
ci: Replace custom workflow installing Luacheck with dedicated action (#14)
-rw-r--r-- | .github/workflows/lint.yml | 38 | ||||
-rw-r--r-- | .github/workflows/luacheck.yml | 13 |
2 files changed, 13 insertions, 38 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 0b54968..0000000 --- a/.github/workflows/lint.yml +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | name: Lint | ||
2 | |||
3 | concurrency: | ||
4 | # for PR's cancel the running task, if another commit is pushed | ||
5 | group: ${{ github.workflow }} ${{ github.ref }} | ||
6 | cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
7 | |||
8 | on: | ||
9 | # build on PR and push-to-main. This works for short-lived branches, and saves | ||
10 | # CPU cycles on duplicated tests. | ||
11 | # For long-lived branches that diverge, you'll want to run on all pushes, not | ||
12 | # just on push-to-main. | ||
13 | pull_request: {} | ||
14 | push: | ||
15 | branches: | ||
16 | - master | ||
17 | |||
18 | |||
19 | jobs: | ||
20 | lint: | ||
21 | runs-on: ubuntu-20.04 | ||
22 | steps: | ||
23 | - name: Checkout | ||
24 | uses: actions/checkout@v3 | ||
25 | |||
26 | - uses: leafo/gh-actions-lua@v10 | ||
27 | with: | ||
28 | luaVersion: "5.4" | ||
29 | |||
30 | - uses: leafo/gh-actions-luarocks@v4 | ||
31 | |||
32 | - name: dependencies | ||
33 | run: | | ||
34 | luarocks install luacheck | ||
35 | |||
36 | - name: lint | ||
37 | run: | | ||
38 | luacheck . | ||
diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..9cb784c --- /dev/null +++ b/.github/workflows/luacheck.yml | |||
@@ -0,0 +1,13 @@ | |||
1 | name: Luacheck | ||
2 | |||
3 | on: [push, pull_request] | ||
4 | |||
5 | jobs: | ||
6 | |||
7 | luacheck: | ||
8 | runs-on: ubuntu-22.04 | ||
9 | steps: | ||
10 | - name: Checkout | ||
11 | uses: actions/checkout@v4 | ||
12 | - name: Luacheck | ||
13 | uses: lunarmodules/luacheck@v1 | ||