Skip to content

Bump daisyui from 3.4.0 to 3.5.0 in /web #576

Bump daisyui from 3.4.0 to 3.5.0 in /web

Bump daisyui from 3.4.0 to 3.5.0 in /web #576

Workflow file for this run

name: CI/CD Process
on:
push:
branches:
- "main"
paths-ignore:
- "**.md"
- LICENSE
- "docker-compose.yml"
- "docker-compose.dev.yml"
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
pull_request:
branches:
- "*"
paths-ignore:
- "**.md"
- LICENSE
- "docker-compose.yml"
- "docker-compose.dev.yml"
- ".github/ISSUE_TEMPLATE/*.yml"
- ".github/dependabot.yml"
workflow_dispatch:
release:
types: [published, edited]
jobs:
check-json-syntax:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check syntax of models JSON file
run: cat ./api/src/serge/data/models.json | jq -e .
validate-models-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate models.json against a json schema
uses: cardinalby/schema-validator-action@v3
with:
file: './api/src/serge/data/models.json'
schema: './api/src/serge/schema/schema.json'
fileParser: json
mode: default
python-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies with poetry
working-directory: ./api
run: |
pip install poetry
poetry install
- name: Run unit tests
working-directory: ./api
run: |
poetry run python -m pytest
check-sh-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: luizm/[email protected]
env:
SHFMT_OPTS: "-s"
with:
sh_checker_only_diff: false
sh_checker_comment: false
check-api-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run ruff check
uses: chartboost/ruff-action@v1
with:
src: "./api"
args: "--verbose"
- name: Run black check
uses: psf/black@stable
with:
options: "--check --diff --verbose"
src: "./api"
check-web-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '19'
- name: Install web
working-directory: ./web
run: npm ci
- name: Run linting
working-directory: ./web
run: npm run lint
- name: Check type errors
working-directory: ./web
run: npm run check
build-and-publish-image:
runs-on: ubuntu-latest
needs:
- validate-models-schema
- check-json-syntax
- check-api-code
- check-web-code
- python-unit-tests
- check-sh-files
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/serge-chat/serge
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
target: release
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}