Skip to content

some fixes to blog comment functions and update CSS for text highligh… #125

some fixes to blog comment functions and update CSS for text highligh…

some fixes to blog comment functions and update CSS for text highligh… #125

Workflow file for this run

# run-full-ciy.yml
#
# This GitHub actions workflow runs 'lint' and 'tests' job against all branches on 'git push' to those branches.
# It updates the 'release-branch' if the 'lint' and 'test' jobs succeed for 'main' branch pushes.
#
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# For if/then context see: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
# For checking out a branch see: https://github.com/actions/checkout
# For setting up python see: https://github.com/actions/setup-python
# For setting up node see: https://github.com/actions/setup-node
# For running pre-commit see: https://github.com/pre-commit/action
# For setting up postgres service container see: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers
name: Run full CI
on: push
jobs:
# Lint job: (Run on all branch pushes)
# - Checks out our branch
# - Installs python
# - Sets up the pre-commit cache and runs pre-commit
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install python dependencies
run: |
pip install uv
uv venv venv
source venv/bin/activate
uv pip install -r requirements-dev.txt
- name: Install npm dependencies
run: npm install
- uses: pre-commit/action@v3.0.1
# Test job: (Run on all branch pushes)
# - Checks out our branch
# - Installs python and establishes pip cache
# - Installs our dev dependencies
# - Runs our pytests
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
- name: Install dependencies
run: |
pip install uv
uv pip install -r requirements-dev.txt --system
- name: Test with pytest
run: pytest --tb=line
# Release job: (Run on push to the 'main' branch)
# - Only run if 'lint' and 'test' jobs succeed
# - Checks out the 'release-branch' (assumes 'release-branch' exists)
# - Sets up some git credentials and fetches the latest git origin
# - Resets the 'release-branch' to reflect the 'main' branch
# - Pushes the updated 'release-branch' to our repository
release:
permissions:
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: "release-branch"
- name: Update Release Branch
run: |
git config user.email "frenzyfox@gmail.com"
git config user.name "code-with-teddy CI Runner"
git fetch origin
git checkout release-branch
git reset --hard origin/main
git push origin HEAD --force