Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate js and py (take 2) #187

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,24 @@ jobs:
vim --version
make --keep-going $MAKE_TARGET

- name: Commit and push
if: success() && matrix.make_target == 'fast-test' && github.ref_name == 'master'
- name: Generate js and py
if: matrix.make_target == 'fast-test' && github.ref_name == 'master'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! make fast-check; then
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin 'https://github-actions:${{ github.token }}@github.com/${{ github.repository }}'
git switch -c bot/generate-jspy
git add js/vimlparser.js py/vimlparser.py
git commit -m 'generate js and py'
git push origin '${{ github.ref_name }}'
git commit -m 'chore: generate js and py'
git push -u origin "$(git rev-parse --abbrev-ref @)"
gh pr create --base master --title 'chore: generate js and py' --body '' | tee /tmp/pull_request
gh pr merge "$(cat /tmp/pull_request)" --auto --merge --delete-branch
fi

- name: Coverage from Python
if: success() && matrix.make_target == 'fast-test'
if: always() && matrix.make_target == 'fast-test'
run: |
# Coverage from Python (cannot be combined with non-branch data).
if [[ -f .coverage_covimerage ]]; then
Expand All @@ -96,23 +100,22 @@ jobs:
fi

- name: Codecov for Python
if: success() && matrix.make_target == 'fast-test'
uses: codecov/codecov-action@v2
if: matrix.make_target == 'fast-test'
uses: codecov/codecov-action@v3
with:
files: coverage.xml
flags: python

- name: Coverage from Vim
if: success()
if: always()
run: |
# Coverage from Vim.
covimerage write_coverage $TEST_PROFILE
coverage report -m
coverage xml

- name: Codecov for Vim
if: success()
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: coverage.xml
flags: vimscript