ci too;
This commit is contained in:
parent
dcb7debff6
commit
83d3702d3e
3 changed files with 26 additions and 4 deletions
19
.github/workflows/stylua.yml
vendored
Normal file
19
.github/workflows/stylua.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Stylua
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
stylua:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: JohnnyMorganz/stylua-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
|
|
@ -34,18 +34,18 @@ local function setup_python_env()
|
|||
end
|
||||
|
||||
if vim.fn.isdirectory(venv_dir) == 0 then
|
||||
log('Setting up Python environment for scrapers...')
|
||||
log('setting up Python environment for scrapers...')
|
||||
local result = vim.fn.system(
|
||||
('cd %s && uv sync'):format(vim.fn.shellescape(plugin_path))
|
||||
)
|
||||
if vim.v.shell_error ~= 0 then
|
||||
log(
|
||||
'Failed to setup Python environment: ' .. result,
|
||||
'failed to setup Python environment: ' .. result,
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
return false
|
||||
end
|
||||
log('Python environment setup complete')
|
||||
log('python environment setup complete')
|
||||
end
|
||||
|
||||
return true
|
||||
|
|
@ -56,7 +56,7 @@ local competition_types = { 'atcoder', 'codeforces', 'cses', 'icpc' }
|
|||
local function setup_contest(contest_type)
|
||||
if not vim.tbl_contains(competition_types, contest_type) then
|
||||
log(
|
||||
('Unknown contest type. Available: [%s]'):format(
|
||||
('unknown contest type. Available: [%s]'):format(
|
||||
table.concat(competition_types, ', ')
|
||||
),
|
||||
vim.log.levels.ERROR
|
||||
|
|
|
|||
|
|
@ -39,4 +39,7 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim):
|
|||
|
||||
## TODO
|
||||
|
||||
- vimdocs
|
||||
- example video
|
||||
- more flexible setup (more of a question of philosophy)
|
||||
- USACO support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue