diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..a390d7d --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,22 @@ +name: Format +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened +jobs: + stylua: + name: Stylua + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run stylua + uses: JohnnyMorganz/stylua-action@479972f01e665acfcba96ada452c36608bdbbb5e # v4.1.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: 2.1.0 + args: --check lua/tabi/ test/ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7c4ff8e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Lint +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened +jobs: + luacheck: + name: Luacheck + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Run luacheck + uses: lunarmodules/luacheck@cc089e3f65acdd1ef8716cc73a3eca24a6b845e4 # v1.2.0 + with: + args: lua/tabi/ test/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6a9bfd3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened +jobs: + vusted: + name: Vusted + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04] + rev: [v0.11.0, nightly] + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Setup Neovim + uses: rhysd/action-setup-vim@8e931b9954b19d4203d5caa5ff5521f3bc21dcc7 # v1.4.2 + with: + neovim: true + version: ${{ matrix.rev }} + - name: Prepare + run: | + sudo apt-get update + sudo apt-get install -y luarocks + sudo luarocks install vusted + - name: Run tests + run: vusted test/ diff --git a/test/tabi/edge_cases/data_integrity_spec.lua b/test/tabi/edge_cases/data_integrity_spec.lua index bcd070f..a8b8f3b 100644 --- a/test/tabi/edge_cases/data_integrity_spec.lua +++ b/test/tabi/edge_cases/data_integrity_spec.lua @@ -271,7 +271,7 @@ describe("edge cases: data integrity", function() it("should handle quotes and backslashes", function() local session = session_module.create("quotes-test") - local content = 'Quote: "test" and \'single\' with \\ backslash' + local content = "Quote: \"test\" and 'single' with \\ backslash" local note = note_module.create("/test.lua", 1, content) session_module.add_note(session, note)