Skip to content

Adding event tracking #96

Adding event tracking

Adding event tracking #96

Workflow file for this run

#
# YAML file configuring the actions to take when releasing to production
#
# > Syntax tips here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Pull request checker
on:
pull_request
jobs:
check_pull_request:
name: check pull request
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Installing Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Installing packages
run: make install
# Code testing
- name: Run code test
run: source $(poetry env info --path)/bin/activate && make test
#
# Below, one must be careful to activate the "poetry" environment where relevant,
# as the commands do not operate in the right environment without it
#
- name: Defining Git identity
run: |
git config user.name github_actions
git config user.email github_actions@pierrevf.consulting
# Code cleanup
- name: Run code cleanup
run: source $(poetry env info --path)/bin/activate && ruff format .
# Code cleanup
- name: Commit changes back
uses: EndBug/add-and-commit@v9
with:
author_name: github_actions
message: "Automatic code reformatting"
add: "."
push: true