From 8fef0bde6b5fa6375974a60a15b42de78854641a Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Thu, 17 Apr 2025 00:02:43 -0400 Subject: [PATCH] Inside we both know what's been going on --- .gitea/workflows/build.yml | 38 ++++++++++++++++++------------------- .gitea/workflows/deploy.yml | 14 +++++++------- .gitea/workflows/tests.yml | 27 +++++++++++++------------- backend/main.go | 8 ++++---- 4 files changed, 44 insertions(+), 43 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 216691b..012a5d7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -3,42 +3,42 @@ on: tags: - '**' -name: Build +name: ๐Ÿ—๏ธโœจ Build Workflow jobs: BuildFrontend: - name: ๐Ÿ”จ Build Frontend + name: ๐Ÿ–ผ๏ธ๐Ÿ”จ Build Frontend runs-on: ubuntu-latest steps: - - name: ๐Ÿ›ก Add Siteworx CA + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates run: | apt update && apt install -yq ca-certificates curl curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt update-ca-certificates - - name: ๐Ÿ“– Checkout code + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code uses: actions/checkout@v2 with: fetch-depth: 1 - - name: ๐Ÿ”‘ Login to Docker Hub + - name: ๐Ÿ”‘๐Ÿ” Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: ๐Ÿ”‘ Login to Siteworx Registry + - name: ๐Ÿ”‘๐Ÿ› ๏ธ Login to Siteworx Registry uses: docker/login-action@v3 with: username: ${{ vars.SITEWORX_USERNAME }} password: ${{ secrets.SITEWORX_PASSWORD }} registry: scr.siteworxpro.com - - name: โš™๏ธ Set up QEMU + - name: โš™๏ธ๐Ÿ› ๏ธ Set up QEMU uses: docker/setup-qemu-action@v3 - - name: ๐Ÿณ Build Container + - name: ๐Ÿณ๐Ÿ”จ Build Frontend Container uses: docker/build-push-action@v6 with: context: ./frontend @@ -47,7 +47,7 @@ jobs: tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }} push: true - - name: ๐Ÿ“ฆ Build Latest Container + - name: ๐Ÿ“ฆโœจ Build Latest Frontend Container uses: docker/build-push-action@v6 with: context: ./frontend @@ -57,41 +57,41 @@ jobs: push: true BuildBackend: - name: ๐Ÿ”จ Build Backend + name: ๐Ÿ–ฅ๏ธ๐Ÿ”จ Build Backend runs-on: ubuntu-latest steps: - - name: ๐Ÿ›ก Add Siteworx CA + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates run: | apt update && apt install -yq ca-certificates curl curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt update-ca-certificates - - name: ๐Ÿ“– Checkout code + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code uses: actions/checkout@v2 with: fetch-depth: 1 - - name: ๐Ÿ”‘ Login to Docker Hub + - name: ๐Ÿ”‘๐Ÿ” Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: ๐Ÿ”‘ Login to Siteworx Registry + - name: ๐Ÿ”‘๐Ÿ› ๏ธ Login to Siteworx Registry uses: docker/login-action@v3 with: username: ${{ vars.SITEWORX_USERNAME }} password: ${{ secrets.SITEWORX_PASSWORD }} registry: scr.siteworxpro.com - - name: โš™๏ธ Set up QEMU + - name: โš™๏ธ๐Ÿ› ๏ธ Set up QEMU uses: docker/setup-qemu-action@v3 - - name: ๐Ÿ—๏ธ Set up Docker Buildx + - name: ๐Ÿ—๏ธ๐Ÿ”ง Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: ๐Ÿณ Build Container + - name: ๐Ÿณ๐Ÿ”จ Build Backend Container uses: docker/build-push-action@v6 with: context: ./backend @@ -100,11 +100,11 @@ jobs: tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }} push: true - - name: ๐Ÿ“ฆ Build Latest Container + - name: ๐Ÿ“ฆโœจ Build Latest Backend Container uses: docker/build-push-action@v6 with: context: ./backend file: ./backend/Dockerfile platforms: linux/amd64,linux/arm64 tags: scr.siteworxpro.com/reloading-manager/backend:latest - push: true + push: true \ No newline at end of file diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8771733..5fe4831 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -5,29 +5,29 @@ on: - completed jobs: Deploy: - name: ๐Ÿš€ Deploy + name: ๐Ÿš€โœจ Deploy Application runs-on: ubuntu-latest steps: - - name: ๐Ÿ›ก Add Siteworx CA + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates run: | apt update && apt install -yq ca-certificates curl curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt update-ca-certificates - - name: ๐Ÿ“– Checkout code + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code uses: actions/checkout@v2 with: fetch-depth: 1 - - name: ๐Ÿ“ Update Deployment Manifest + - name: ๐Ÿ“๐Ÿ”ง Update Deployment Manifest run: | sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml - - name: ๐Ÿ’พ Commit Changes + - name: ๐Ÿ’พโœ… Commit Updated Manifest uses: EndBug/add-and-commit@v9 with: add: argocd/deployment/deployment.yml - author_name: "GitHub Action" + author_name: "GitHub Action ๐Ÿค–" author_email: gitia@siteworxpro.com - message: "Update deployment manifest with new image tags" \ No newline at end of file + message: "๐Ÿ“๐Ÿ”„ Update deployment manifest with new image tags" \ No newline at end of file diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index f504703..0865ee9 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -3,60 +3,61 @@ on: branches: - "*" -name: Unit Tests +name: ๐Ÿงชโœจ Unit Tests jobs: build-javascript: - name: ๐Ÿงช JavaScript Tests + name: ๐Ÿงช๐Ÿ“œ JavaScript Tests runs-on: ubuntu-latest steps: - - name: ๐Ÿ›ก Add Siteworx CA + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates run: | apt update && apt install -yq ca-certificates curl curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt update-ca-certificates - - name: ๐Ÿ“– Checkout code + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code uses: actions/checkout@v2 with: fetch-depth: 1 - - name: โš™๏ธ Set up Node.js + - name: โš™๏ธ๐Ÿ”ง Set up Node.js Environment uses: actions/setup-node@v2 with: node-version: '22.14.0' - - name: ๐Ÿ“ฆ Install dependencies + - name: ๐Ÿ“ฆ๐Ÿ“ฅ Install Dependencies run: | cd frontend npm install - - name: โœ… Run tests + - name: โœ…๐Ÿงช Run JavaScript Tests run: | cd frontend npm run build + test-go: env: GOPRIVATE: 'git.siteworxpro.com' GOPROXY: 'direct' - name: ๐Ÿ” Go Tests + name: ๐Ÿ”๐Ÿน Go Tests runs-on: ubuntu-latest steps: - - name: ๐Ÿ›ก Add Siteworx CA + - name: ๐Ÿ›ก๏ธ๐Ÿ”’ Add Siteworx CA Certificates run: | apt update && apt install -yq ca-certificates curl curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt update-ca-certificates - - name: โš™๏ธ Set up Go + - name: โš™๏ธ๐Ÿน Set up Go Environment uses: actions/setup-go@v2 with: go-version: '1.24.0' cache: true - - name: ๐Ÿ“– Checkout code + - name: ๐Ÿ“–๐Ÿ” Checkout Repository Code uses: actions/checkout@v2 with: fetch-depth: 1 - - name: ๐Ÿ“ฆ Install dependencies + - name: ๐Ÿ“ฆ๐Ÿ“ฅ Install Dependencies run: | cd backend go mod download - - name: โœ… Run tests + - name: โœ…๐Ÿ” Run Go Tests run: | cd backend go test -v ./... -coverprofile=coverage.out \ No newline at end of file diff --git a/backend/main.go b/backend/main.go index 46117f2..fcafee0 100644 --- a/backend/main.go +++ b/backend/main.go @@ -97,18 +97,18 @@ func main() { addr := fmt.Sprintf("0.0.0.0:%s", Port.GetEnvString("8080")) - e.Logger.Info("Starting Server...") - e.Logger.Infof("Listening on %v", addr) + e.Logger.Info("๐Ÿš€ Starting Server...") + e.Logger.Infof("๐ŸŽง Listening on %v", addr) e.Logger.Fatal(e.Start(addr)) } func migrate(e *echo.Echo) { - e.Logger.Info("Starting migrations...") + e.Logger.Info("๐Ÿ› ๏ธ Starting migrations...") db := database.GetNewDatabase() defer db.Db.Close(context.Background()) db.Migrate() - e.Logger.Info("Done!") + e.Logger.Info("๐Ÿ› ๏ธ Starting migrations...") }