Skip to content

Commit cb92d65

Browse files
committed
build: Added basic CI support
1 parent 85426ae commit cb92d65

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

.github/workflows/lint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Lint
2+
3+
on:
4+
pull_request: {}
5+
workflow_dispatch: {}
6+
push:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
13+
14+
jobs:
15+
lua-check:
16+
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT || 10) }}
17+
name: Lua Check
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
issues: read
22+
checks: write
23+
pull-requests: write
24+
if: (github.actor != 'dependabot[bot]')
25+
26+
steps:
27+
- name: Checkout source code
28+
uses: actions/checkout@v3
29+
30+
# Optional step to run on only changed files
31+
- name: Get changed files
32+
id: changed-files
33+
uses: tj-actions/changed-files@54849deb963ca9f24185fb5de2965e002d066e6b # v37
34+
with:
35+
files: |
36+
**.lua
37+
38+
- name: Lua Check
39+
if: steps.changed-files.outputs.any_changed == 'true'
40+
uses: Kong/public-shared-actions/code-check-actions/lua-lint@a98be0184f832cb24a9dd233f99074e8ba17b488 # v2.3.3
41+
with:
42+
additional_args: '--no-default-config --config .luacheckrc'
43+
files: ${{ steps.changed-files.outputs.all_changed_files }}
44+
action_fail: true

.github/workflows/sast.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: SAST
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- master
8+
- main
9+
workflow_dispatch: {}
10+
11+
12+
jobs:
13+
semgrep:
14+
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT || 10) }}
15+
name: Semgrep SAST
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# required for all workflows
19+
security-events: write
20+
# only required for workflows in private repositories
21+
actions: read
22+
contents: read
23+
24+
if: (github.actor != 'dependabot[bot]')
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: Kong/public-shared-actions/security-actions/semgrep@33449c46c6766a3d3c8f167cc383381225862b36

.github/workflows/tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT || 10) }}
8+
name: Busted Tests
9+
10+
runs-on: ubuntu-24.04
11+
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@main
15+
- name: Run tests
16+
run: make test-unit

0 commit comments

Comments
 (0)