Skip to content

Merge pull request #167 from gardenlinux/dependabot/github_actions/ac… #360

Merge pull request #167 from gardenlinux/dependabot/github_actions/ac…

Merge pull request #167 from gardenlinux/dependabot/github_actions/ac… #360

Workflow file for this run

name: Code Quality Checks
on:
push:
branches:
- main
pull_request:
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build Container for Unit Tests
run: |
podman build -t localhost/unit-tests:latest -f Containerfile.unit-tests .
- name: Run Unit Tests
run: |
podman run -t localhost/unit-tests:latest
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download pg formatter using github token to avoid issues with rate limiting
run: |
curl -H "Authorization: Bearer $GITHUB_TOKEN" -L -o pgformatter.tgz https://github.com/darold/pgFormatter/archive/refs/tags/v5.6.tar.gz
- name: Run format script
run: ./format-sql-schema.sh
- name: Check for uncommitted changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "Code is not properly formatted. Please run ./format-sql-schema.sh and commit the changes."
exit 1
fi