Skip to content

Bump the cli group with 3 updates #374

Bump the cli group with 3 updates

Bump the cli group with 3 updates #374

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
jobs:
lint-and-test-server:
runs-on:
labels: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.90.0
components: clippy, rustfmt
- name: Install Tailwind CSS
run: |
wget -O /usr/local/bin/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.17/tailwindcss-linux-x64
chmod +x /usr/local/bin/tailwindcss
- name: Run clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run tests
run: cargo test
lint-templates:
runs-on:
labels: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install djlint
run: pip install djlint==1.36.4
- name: Run djlint
run: |
djlint \
--reformat \
--configuration ocg-server/templates/.djlintrc \
ocg-server/templates
check-js-files-format:
runs-on:
labels: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Run prettier
uses: creyD/[email protected]
with:
dry: true
prettier_options: --check ocg-server/static/js/**/*.js --config ocg-server/static/js/.prettierrc.yaml
test-database:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container: ghcr.io/cncf/open-community-groups/db-tests
services:
postgres:
image: ghcr.io/cncf/open-community-groups/postgres-db-tests
env:
POSTGRES_USER: tests
POSTGRES_PASSWORD: tests
POSTGRES_DB: tests
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Apply database migrations
working-directory: ./database/migrations
run: TERN_CONF=../../../.github/workflows/tern.conf PGPORT=${{ job.services.postgres.ports[5432] }} ./migrate.sh
- name: Install pgtap database extension
run: PGPASSWORD=tests psql -h postgres -p ${{ job.services.postgres.ports[5432] }} -U tests tests -c 'create extension pgtap;'
- name: Run database tests
working-directory: ./database/tests
run: PGPASSWORD=tests pg_prove --host postgres --dbname tests --username tests --verbose schema/*.sql functions/*/*.sql