Skip to content

update blog post locations SQL type #137

update blog post locations SQL type

update blog post locations SQL type #137

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 uv see: https://github.com/astral-sh/setup-uv
# 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
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.14"
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install python dependencies
run: uv pip install -r requirements-dev.txt --system
- name: Install npm dependencies
run: npm install
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install dependencies
run: 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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