38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Update Dependencies
|
|
on:
|
|
schedule:
|
|
- cron: "0 0/4 * * *" # every day at midnight
|
|
push:
|
|
branches: ["main"]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- name: Update CPP parser
|
|
run: npm update
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Regenerate Source Files
|
|
run: npm run generate
|
|
- name: Generate parser
|
|
run: npm install
|
|
- name: Run tests
|
|
run: |
|
|
git submodule init
|
|
git submodule update
|
|
cd tree-sitter-cpp && git checkout origin/master && cd ..
|
|
cp tree-sitter-cpp/test/corpus/* test/corpus
|
|
npm test
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v3
|
|
with:
|
|
base: ${{ github.head_ref }}
|
|
body: Update dependencies and regenerate CPP parser
|
|
branch: update-cpp-parser
|
|
commit-message: Update dependencies and regenerate CPP parser
|
|
title: Update CPP parser
|