Skip to content

chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 #250

chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.5

chore(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 #250

Workflow file for this run

---
name: Test & Release
on:
schedule:
- cron: "0 0 */5 * *"
push:
branches:
- main
- production
- feature/*
- fix/*
pull_request:
branches:
- main
- production
jobs:
test:
strategy:
max-parallel: 4
matrix:
python-version: ['3.12', '3.11', '3.10', '3.9']
runs-on: ubuntu-latest
steps:
- name: Download code
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download cache for pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: py-${{ matrix.python-version }}-poetry-pip-1.2.2
restore-keys: poetry-pip
- name: Install poetry
run: pip install poetry==1.2.2
- name: Download cache for poetry
id: poetry-install
uses: actions/cache@v3
with:
path: ./.venv/
key: py-${{ matrix.python-version }}-poetry-install-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-install
- name: Install packages
if: steps.poetry-install.outputs.cache-hit != 'true'
run: rm -rf ./.venv/ && poetry install
- name: Download cache for pre-commit
if: matrix.python-version == '3.12'
id: pre-commit-install
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: py-${{ matrix.python-version }}-pre-commit-install-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: pre-commit-install
- name: Verify commit
if: matrix.python-version == '3.12'
run: poetry run pre-commit run -a
- name: Auto-generate missing pairs
if: matrix.python-version == '3.12'
run: poetry run python generatestructs.py
- name: Format code before pushing
if: matrix.python-version == '3.12'
run: poetry run pre-commit run -a
continue-on-error: true
- name: Commit & Push changes
if: matrix.python-version == '3.12' && github.ref == 'refs/heads/main'
uses: actions-js/[email protected]
with:
author_email: "[email protected]"
author_name: "Morty Space"
directory: './src'
message: "sync: updated API pairs and instruments"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare codeclimate
if: matrix.python-version == '3.12'
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Test docs
run: cd docs && make doctest && cd ..
- name: Test code
timeout-minutes: 6
run: poetry run pytest -v --cov . --cov-report xml:coverage.xml
- name: Send codeclimate analytics
if: matrix.python-version == '3.12'
run: ./cc-test-reporter after-build -r ${{ secrets.CC_TEST_REPORTER_ID }} --exit-code $?
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
permissions:
id-token: write
contents: write
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.REPOSITORY_PASSWORD }}
run: |
git fetch --all
git reset --hard origin/main
pip install python-semantic-release poetry
git config user.name github-actions
git config user.email [email protected]
semantic-release version
poetry publish --build
semantic-release publish