Skip to content

Introducing the R-squared coefficient and Treynor Ratio for a financial portfolio #71

Introducing the R-squared coefficient and Treynor Ratio for a financial portfolio

Introducing the R-squared coefficient and Treynor Ratio for a financial portfolio #71

name: Formatting and Version Increment
on:
pull_request:
branches:
- master
env:
SOURCE_BRANCH: ${{ github.head_ref }}
BASE_BRANCH: ${{ github.base_ref }}
jobs:
code-formatting_increment-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -r requirements_test.txt
- name: Run version increment script
id: version_increment
run: |
python scripts/update_version.py ${{ env.BASE_BRANCH }} ${{ env.SOURCE_BRANCH }}
bash scripts/auto_commit.sh "Automated version changes"
continue-on-error: true
- name: Updating README files
id: update_readme
run: |
bash scripts/update_readme.sh
bash scripts/auto_commit.sh "Updating README files"
continue-on-error: true
- name: Code formatting and committing changes
id: code_format
run: |
bash scripts/auto_format.sh
bash scripts/auto_commit.sh "Automated formatting changes"
continue-on-error: true
- name: Push changes to source branch
id: push_to_source_branch
if: ${{ steps.version_increment.outcome == 'success' || steps.update_readme.outcome == 'success' || steps.code_format.outcome == 'success' }}
uses: ad-m/github-push-action@master
with:
branch: ${{ env.SOURCE_BRANCH }}