Skip to content

Commit

Permalink
Merge branch 'master' into lazy-static-completions
Browse files Browse the repository at this point in the history
  • Loading branch information
lavafroth authored Oct 12, 2023
2 parents d504cd6 + 78cda94 commit a228b49
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 23 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on: [push, pull_request]

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- run: cargo clippy -- -D warnings

rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain with rustfmt available
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt

- run: cargo fmt --check

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Rust env
uses: "./.github/actions/setup-rust-env"

- name: Rust test
run: cargo test --workspace
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ jobs:
shell: bash
run: |
RELEASE_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml)
OLD_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' <<< "$(git show HEAD~1:Cargo.toml)")
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
latest=$(curl https://api.github.com/repos/ThePrimeagen/htmx-lsp/releases/latest)
# no releases, default to 0.0.0
if [[ "$latest" == *"Not Found"* ]]; then
OLD_VERSION="0.0.0"
else
OLD_VERSION=$( echo $latest | grep "tag_name" | cut -d'"' -f4 )
fi
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "$OLD_VERSION -> $RELEASE_VERSION"
if [[ "$RELEASE_VERSION" == "$OLD_VERSION" ]]; then
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions lsp/src/htmx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use lsp_types::TextDocumentPositionParams;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, path::PathBuf};


use crate::tree_sitter::Position;

#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down

0 comments on commit a228b49

Please sign in to comment.