mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
ci: update workflows
This commit is contained in:
parent
f8bc6c69d7
commit
1a4116aef1
3 changed files with 12 additions and 20 deletions
2
.github/workflows/test-queries.yml
vendored
2
.github/workflows/test-queries.yml
vendored
|
|
@ -84,4 +84,4 @@ jobs:
|
||||||
run: cp -r ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/* parser
|
run: cp -r ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/* parser
|
||||||
|
|
||||||
- name: Check query files
|
- name: Check query files
|
||||||
run: $NVIM --headless -c "luafile ./scripts/check-queries.lua" -c "q"
|
run: $NVIM -l scripts/check-queries.lua
|
||||||
|
|
|
||||||
16
.github/workflows/update-lockfile.yml
vendored
16
.github/workflows/update-lockfile.yml
vendored
|
|
@ -18,29 +18,25 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NVIM_TAG: stable
|
NVIM_TAG: stable
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/josephburnett/jd/releases/download/v1.6.1/jd-amd64-linux
|
wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux
|
||||||
mv ./jd-amd64-linux /tmp/jd
|
mv jd-amd64-linux /tmp/jd
|
||||||
chmod +x /tmp/jd
|
chmod +x /tmp/jd
|
||||||
sudo apt install libfuse2
|
bash scripts/ci-install-${{ matrix.os }}.sh
|
||||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
|
|
||||||
chmod u+x nvim.appimage
|
|
||||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
|
|
||||||
- name: Update parsers
|
- name: Update parsers
|
||||||
env:
|
env:
|
||||||
SKIP_LOCKFILE_UPDATE_FOR_LANGS: ""
|
SKIP_LOCKFILE_UPDATE_FOR_LANGS: ""
|
||||||
run: |
|
run: |
|
||||||
cp lockfile.json /tmp/old_lockfile.json
|
cp lockfile.json /tmp/old_lockfile.json
|
||||||
./nvim.appimage --headless -c "luafile ./scripts/write-lockfile.lua" -c "q"
|
nvim -l scripts/write-lockfile.lua
|
||||||
# Pretty print
|
# Pretty print
|
||||||
cp lockfile.json /tmp/lockfile.json
|
cp lockfile.json /tmp/lockfile.json
|
||||||
cat /tmp/lockfile.json | jq --sort-keys > lockfile.json
|
cat /tmp/lockfile.json | jq --sort-keys > lockfile.json
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub"
|
git config user.name 'GitHub'
|
||||||
git config user.email "noreply@github.com"
|
git config user.email 'noreply@github.com'
|
||||||
git add lockfile.json
|
git add lockfile.json
|
||||||
UPDATED_PARSERS=$(/tmp/jd -f merge /tmp/old_lockfile.json lockfile.json | jq -r 'keys | join(", ")')
|
UPDATED_PARSERS=$(/tmp/jd -f merge /tmp/old_lockfile.json lockfile.json | jq -r 'keys | join(", ")')
|
||||||
echo "UPDATED_PARSERS=$UPDATED_PARSERS" >> $GITHUB_ENV
|
echo "UPDATED_PARSERS=$UPDATED_PARSERS" >> $GITHUB_ENV
|
||||||
|
|
|
||||||
14
.github/workflows/update-readme.yml
vendored
14
.github/workflows/update-readme.yml
vendored
|
|
@ -17,19 +17,15 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NVIM_TAG: stable
|
NVIM_TAG: stable
|
||||||
run: |
|
run: |
|
||||||
sudo apt install libfuse2
|
bash ./scripts/ci-install-ubuntu-latest.sh
|
||||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
|
|
||||||
chmod u+x nvim.appimage
|
|
||||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
|
|
||||||
- name: Check README
|
- name: Check README
|
||||||
run: |
|
run: |
|
||||||
git config user.email "actions@github"
|
git config user.email 'actions@github'
|
||||||
git config user.name "Github Actions"
|
git config user.name 'Github Actions'
|
||||||
./nvim.appimage --headless -c "luafile ./scripts/update-readme.lua" -c "q" || echo "Needs update"
|
nvim -l scripts/update-readme.lua || echo 'Needs update'
|
||||||
git add README.md
|
git add README.md
|
||||||
git commit -m "Update README" || echo 'No commit necessary!'
|
git commit -m 'Update README' || echo 'No commit necessary!'
|
||||||
git clean -xf
|
git clean -xf
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue