Merge pull request 'Initial Woodpecker CI setup' (#4) from feat/woodpecker-initial into master
ci/woodpecker/push/lint Pipeline was successful Details

Reviewed-on: #4
This commit is contained in:
Aire-One 2022-08-12 20:12:20 +02:00
commit 249e836fd6
5 changed files with 30 additions and 8 deletions

View File

@ -16,3 +16,6 @@ indent_size = 2
[*.json] [*.json]
indent_size = 2 indent_size = 2
[*.yml]
indent_size = 2

20
.woodpecker/lint.yml Normal file
View File

@ -0,0 +1,20 @@
pipeline:
lint:
image: ghcr.io/lunarmodules/luacheck:v0.26.1
group: lint
commands:
- apk add just
- just check-lua
when:
path:
include: [".woodpecker/lint.yml", "*.lua"]
style:
image: alpine:edge # Stylua is only available on edge repository for now
group: lint
commands:
- apk add just stylua
- just check-format
when:
path:
include: [".woodpecker/lint.yml", "*.lua"]

View File

@ -2,6 +2,7 @@
A project to generate Teal types definitions for the Awesome WM based on the API documentation. A project to generate Teal types definitions for the Awesome WM based on the API documentation.
[![status-badge](https://woodpecker.aireone.xyz/api/badges/Aire-One/awesomewm.d.tl/status.svg)](https://woodpecker.aireone.xyz/Aire-One/awesomewm.d.tl)
# Dependencies # Dependencies
Project dependencies : Project dependencies :

View File

@ -1,15 +1,14 @@
lua_version := "5.4" lua_version := "5.4"
lua_bin := "lua" + lua_version
lua := lua_bin + " -l set_paths"
rocks_tree := "lua_modules" rocks_tree := "lua_modules"
rockspec_file := "rockspecs/awesomewm.d.tl-dev-1.rockspec" rockspec_file := "rockspecs/awesomewm.d.tl-dev-1.rockspec"
lua_bin := `command -v lua5.4`
lua := lua_bin + " -l set_paths"
luarocks := `command -v luarocks`
lua_targets := `find src/ -iname '*.lua' | xargs` + " " + `ls *.lua | xargs` lua_targets := `find src/ -iname '*.lua' | xargs` + " " + `ls *.lua | xargs`
install: install:
{{ luarocks }} \ luarocks \
--lua-version {{ lua_version }} \ --lua-version {{ lua_version }} \
install \ install \
--tree {{ rocks_tree }} \ --tree {{ rocks_tree }} \

View File

@ -24,8 +24,7 @@ log:info(
-- log:info(inspect { items }) -- log:info(inspect { items })
-- end -- end
local page = crawler.fetch( local page =
properties.base_url .. "/widgets/awful.widget.button.html" crawler.fetch(properties.base_url .. "/widgets/awful.widget.button.html")
)
local items = scraper.get_doc_from_page(page) local items = scraper.get_doc_from_page(page)
log:info(inspect { items }) log:info(inspect { items })