chore(ci): it should stop ci from running the same action twice
add basic test to check ci chore(ci): hopefully adds cache for tests
This commit is contained in:
parent
75f2c033fb
commit
ecb9919e02
4 changed files with 47 additions and 2 deletions
8
.github/workflows/linters.yml
vendored
8
.github/workflows/linters.yml
vendored
|
|
@ -1,5 +1,11 @@
|
|||
name: linters
|
||||
on: [push, pull_request]
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
|
|
|
|||
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
|
|
@ -1,5 +1,11 @@
|
|||
name: tests
|
||||
on: [push, pull_request]
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
|
|
@ -19,6 +25,12 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache .tests
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .tests
|
||||
key: ${{ runner.os }}-tests-${{ hashFiles('.tests') }}
|
||||
|
||||
- name: Install NeoVim
|
||||
uses: rhysd/action-setup-vim@v1
|
||||
with:
|
||||
|
|
|
|||
9
spec/integration/struct_tags_test.lua
Normal file
9
spec/integration/struct_tags_test.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
local t = require "spec.testutils"
|
||||
|
||||
local T = MiniTest.new_set {}
|
||||
T["struct_tags"] = MiniTest.new_set {}
|
||||
T["struct_tags"]["fuck it"] = function()
|
||||
t.eq(1, 1)
|
||||
end
|
||||
|
||||
return T
|
||||
18
spec/testutils.lua
Normal file
18
spec/testutils.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
-- NOTE: there's a probably a better way to do this
|
||||
local fixtures_dir = (vim.fn.expand "%:p:h") .. "/spec/fixtures/"
|
||||
|
||||
---@class gopher.TestUtils
|
||||
local testutils = {}
|
||||
|
||||
---@generic T
|
||||
---@param a T
|
||||
---@param b T
|
||||
---@return boolean
|
||||
function testutils.eq(a, b)
|
||||
return MiniTest.expect.equality(a, b)
|
||||
end
|
||||
|
||||
-- TODO: continue with writing fixtures helpers
|
||||
-- https://github.com/olexsmir/gopher.nvim/pull/71/files
|
||||
|
||||
return testutils
|
||||
Loading…
Add table
Add a link
Reference in a new issue