Skip to content

Unit testing for data-process.R #4

Unit testing for data-process.R

Unit testing for data-process.R #4

Workflow file for this run

name: Pre-commit and Auto Merge
on:
push:
branches:
- '**' # This will trigger on pushes to any branch
pull_request:
branches:
- '**' # This will trigger on PRs to any branch
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: |
pre-commit run --all-files
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add .
- name: Commit changes
run: git commit -m "Apply pre-commit changes" || echo "No changes to commit"
- name: Merge changes
run: |
# Check if there are changes to push
if [ -n "$(git status --porcelain)" ]; then
git push origin "${{ github.ref }}"
else
echo "No changes to push."
fi